diff options
Diffstat (limited to 'battle/skills.py')
-rw-r--r-- | battle/skills.py | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/battle/skills.py b/battle/skills.py index 91bb990..29608ff 100644 --- a/battle/skills.py +++ b/battle/skills.py @@ -1,6 +1,6 @@ -######################################################################################## +################################################################################# # This file is part of Spheres. -# Copyright (C) 2019 Jesusalva +# Copyright (C) 2019-2021 Jesusalva # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -14,11 +14,13 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -######################################################################################## +################################################################################# # Battle Module - Skills +# SRV_NOCAST => Effects of SRV_SKILL follows from utils import stdout, Battle from consts import (SK_SINGLE_DMG, SK_MULTI_DMG, SK_ATK_UP, SK_DEF_UP, - SK_SINGLE_HEAL, SK_MULTI_HEAL, SC_ATKUP, SC_DEFUP) + SK_SINGLE_HEAL, SK_MULTI_HEAL, SC_ATKUP, SC_DEFUP, + SRV_SKILL, SRV_NOCAST) from battle.common import find_target, calc_dmg, attackall def skill_core(token, mask, force, element): global Battle @@ -41,7 +43,9 @@ def skill_core(token, mask, force, element): target_id=find_target(token, "enemy") stdout("Enemy selected: %d" % target_id) target=Battle[token]["enemy"][target_id] - target["hp"]-=calc_dmg(token, dummy, target, dummy["atk"]) + dmg = calc_dmg(token, dummy, target, dummy["atk"]) + target["hp"] -= dmg + Battle[token]["log"].append(["", 0, SRV_NOCAST, dmg, "enemy", target_id]) if mask & SK_MULTI_DMG: # Multi Damage skill: 1 strength = 1 damage @@ -80,8 +84,9 @@ def skill_core(token, mask, force, element): def handle_skill(token, skill_id): global Battle - # TODO - #Battle[token]["log"].append(["who", 0, skill_id << ??, dmg, "target", 0]) + # TODO / FIXME + dmg = 0 + Battle[token]["log"].append(["who", 0, SRV_SKILL+skill_id, dmg, "target", 0]) return |