JoCaNo-Productions / flat-land

1 stars 0 forks source link

Champion Base Class #5

Open nmay231 opened 5 years ago

nmay231 commented 5 years ago

While we are working through the development of the first champions, the Champion class will probably change substantially. Use this issue to discuss those changes until we feel that Champion() is mature enough.

nmay231 commented 5 years ago

@calebmrose00 I saw you added the 'targetable' attribute to Champion. I think that attributes like that, such as visible, able-to-attack, regen-able, they should all be in a list Champion.until. The name is until to make code flow in speech like "until visible" or "until targetable". It can be a different name for all I care.

So as an example, Dark at Knight's ultimate ability will set self.until['targetable'] and self.until['visible'] to 4. For right now, I just put self.until_targetable and self.until_visible, but we should change it to the dictionary. Then, we can iterate over self.until and decrement each item (if not already zero) each turn. The game would then use champ.until['visible'] == 0 to check if the champion is visible.

Can you think of a reason we would need to apply mods to the "until" attributes? I can think of champions that would not be able to regen for 2 or 3 turns instead of just 1 after being attacked. But, that can be implemented through NewChampionName.damage() with adding self.until['health_regen']=2 at the end.

calebmrose00 commented 5 years ago

got it

nmay231 commented 5 years ago

I just realized that all of the ability function annotations say that they return None instead of int... Derp! For the undeveloped Champs, let's just add the correct annotations as we go along. I'll change DaK and Angelo now. It doesn't really matter, but it should be correct.