Advanced Search
Search Results
79 total results found
battle.py
"""Battle engine: handles all combat calculations and the battle loop.""" from __future__ import annotations import random import math from typing import List, Optional, Tuple, Dict from data_types import * from character import Character from monster_u...
character.py
"""Character class - handles stats, leveling, skills, status effects.""" from __future__ import annotations import random from dataclasses import dataclass, field from typing import List, Dict, Optional, Tuple from data_types import * from skills_db impo...
companions.py
"""Companion character database: 20x3★, 10x4★, 5x5★.""" from __future__ import annotations import random from data_types import * from character import Character, JOB_BASE_STATS, JOB_GROWTH from skills_db import SKILL_DB, JOB_SKILL_POOL def _make_com...
data_types.py
"""Core data types, enums, and constants for the JRPG game.""" from __future__ import annotations from dataclasses import dataclass, field from enum import Enum, auto from typing import Optional, List, Dict, Any class WeaponType(Enum): SWORD = "S...
game_state.py
"""Game state: manages party, inventory, battle progression.""" from __future__ import annotations import random from dataclasses import dataclass, field from typing import List, Dict, Optional, Tuple from data_types import * from character import Charac...
items_db.py
"""Items database with 120 items.""" from data_types import * def build_item_database() -> Dict[int, Item]: items = {} def add(id, name, itype, desc, val, target=SkillTarget.SINGLE_ALLY, elem=None, cures=None, buff=None, bdur=0): ...
monster_unit.py & monsters_db.py
monster_unit.py """Monster combat unit - wraps MonsterTemplate with battle state.""" from __future__ import annotations import random from dataclasses import dataclass, field from typing import List, Optional from data_types import * from monsters_db im...
skills_db.py
"""Skills database with 100 skills across all job classes.""" from data_types import * def build_skill_database() -> Dict[int, Skill]: skills = {} def s(id, name, stype, power, mp, acc, elem, hits, target, tier, desc, jobs, effect=None): skills...
[HTML] DIY Roulette
Fair Roulette
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Fortune Wheel</title> <link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&fami...
Biased Roulette
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Fortune Wheel</title> <link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&fami...
[Python] Bank Account Simulator
main.py
import json import datetime # load account if exists def load_account(): try: with open("account.json", "r") as f: account = json.load(f) return account except FileNotFoundError: return -1 # create ...
account.json
{"balance": 1038.0, "transactions": [{"transaction_id": "0000000001", "type": "deposit", "amount": 50.0, "date": "2025-12-07 22:51:28.043060", "balance_after": 50.0}, {"transaction_id": "0000000002", "type": "deposit", "amount": 50.0, "date": "2025-12-07 22:51...
[Python] Connect 4
main.py
board=[[' ']*7, [' ']*7, [' ']*7, [' ']*7, [' ']*7, [' ']*7] fin=False valid=True r=0 def display(): global board row=' ' for i in range(6): row='ㅣ'+board[i][0] for j in range(6): ...
[Python] Important Algorithms
Factorial function def factorial(n): #Task 1: Factorial function if n==0: #Case 1: 0! return 1 else: #Case 2: <positive_integer>! return n*factorial(n-1) #multiply with factorial of n-1 Recursive arithmetic sum ...