package ThermoTower import Tower constant buffcode = 'Bfro' constant ORB_ID = 'A01S' public constant THERMO_TOWER_ID = 'h01R' public class ThermoTower extends Tower boolean isHot int level construct(Tower t) super(t) isHot = true override function onAttack(UnitEntity ud) if isHot if GetUnitAbilityLevel(ud.actor, buffcode) > 0 UnitDamageTarget(actor,ud.actor,getDamage(),true,false,ATTACK_TYPE_MELEE,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS) ud.actor.removeAbility(buffcode) actor.addAbility(ORB_ID) isHot = false else let t = getTimer() t.setData(this castTo int) t.start(1.3, function ThermoTower.removeFrostAbil) isHot = true static function removeFrostAbil() let t = GetExpiredTimer().getData() castTo ThermoTower GetExpiredTimer().release() t.actor.removeAbility(ORB_ID) override function onUpgrade() level ++ function getDamage() returns real return (50.+(40*level))