Még adatcentrikusabb csatarendszer + pár screenshot

This commit is contained in:
markojozsef
2026-09-30 12:17:16 +02:00
parent 5c7db0e77e
commit 2d1bae444c
5 changed files with 61 additions and 25 deletions

View File

@@ -26,19 +26,7 @@ def move_phoenix(user, target):
return Action("Phoenix Down", user, target, Damage(0, 0, 0, 30), StatusChange(2, 0, 0))
def move_softenup(user, target):
return Action("Esuna (remove stoneskin)", user, target, Damage(0, 0, 0, 0), StatusChange(2, 0, 0))
MOVES = {
"attack": ("Physical attack", move_attack, True),
"fire": ("Fira (fire magic)", move_fire, True),
"ice": ("Blizzara (ice magic)", move_ice, True),
"cure": ("Cure (heal ally)", move_cure, False),
"defend": ("Defend (self def_up)", move_defend, None), # self-only, forced
"break": ("Break (inflict stone)", move_break, True),
"death": ("Death (instant KO)", move_death, True),
"phoenix": ("Phoenix Down (revive ally)",move_phoenix, False),
"unstone": ("Esuna (cure stone)", move_softenup,False),
}
return Action("Esuna", user, target, Damage(0, 0, 0, 0), StatusChange(2, 0, 0))
def enemy_turn_test(e,ep, ap,d):
living = [p for p in ap if not p.ko]
@@ -75,7 +63,7 @@ def enemy_turn_test(e,ep, ap,d):
act = random.choice(["attack", "fire", "ice"])
target = random.choice(living)
_, builder, _ = MOVES[act]
_, builder, _ = d["moves"][act]
print(f" ({e.name} chooses {act} -> {target.name})")
return builder(e, target)
@@ -92,6 +80,60 @@ battles = [
Combatant("Cyan", 130, 38, 70, 40, 20, 20, False, False),
],
"enemy_turn_func": enemy_turn_test,
"mus_id": "mus_fnafsux"
"mus_id": "mus_fnafsux",
"init_ai_data": {
"moves": {
"attack": ("Physical attack", move_attack, True),
"fire": ("Fira", move_fire, True),
"ice": ("Blizzara", move_ice, True),
"cure": ("Cure", move_cure, False),
"defend": ("Defend", move_defend, None),
"break": ("Break", move_break, True),
"death": ("Death", move_death, True),
"phoenix": ("Phoenix Down", move_phoenix, False),
"unstone": ("Esuna", move_softenup,False),
}
},
"menus": [
{ # Locke
"Attack": "phys_att",
"": "unselectable",
"": "unselectable",
"Item": "items"
},
{ # Terra
"Attack": "phys_att",
"Magic": "magic",
"": "unselectable",
"Item": "items"
},
{ # Celes
"Attack": "phys_att",
"Magic": "magic",
"": "unselectable",
"Item": "items"
},
{ # Cyan
"Attack": "phys_att",
"": "unselectable",
"": "unselectable",
"Item": "items"
}
],
"spells": [
{}, # Locke
{ # Terra
"Fira": ("Fira", move_fire, True),
"Blizzara": ("Blizzara", move_ice, True),
},
{ # Celes
"Fira": ("Fira", move_fire, True),
"Blizzara": ("Blizzara", move_ice, True),
},
{} # Cyan
],
"inventory": [
["Phoenix Down",67, ("Phoenix Down", move_phoenix, False)]
]
}
]