screepers / typed-screeps-arena

MIT License
26 stars 14 forks source link

Add AreaEffect prototype and adjust arena/constants #3

Closed ngbrown closed 3 years ago

ngbrown commented 3 years ago

I added the AreaEffect which was needed for Collect and Control advanced (to avoid the damage effects). I also adjusted the arena/constants to be split types/const like the other constants.

Also, adjusted ScoreCollector to extend GameObject like in the docs. Just because it has a my property, I don't think it should derive from owned because the control flips based on score.

thmsndk commented 3 years ago

🤔 towers can be neutral in advanced CTF can't they? can the ScoreCollector be neutral as well? because then we might need to update .my to also be undefined e.g. my?: boolean I can see we need to do that for towers at least

ngbrown commented 3 years ago

I added tests and rebased.

Regarding towers being neutral, maybe my argument ownership changing was weak, but the help documentation specifically said "class StructureTower Extends OwnedStructure" and "class ScoreCollector Extends GameObject".