コード例 #1
0
        override public void atack(GameObj unit)
        {
            Coord range = (this.Position - unit.Position).ABS;

            if (range.X > 1 || range.Y > 1)
            {
                throw new Exception("long range");
            }

            //unit.health -= (this.damage * this.attack) / unit.defense;
            unit.health -= this.damage; // simple
        }
コード例 #2
0
 abstract public void atack(GameObj unit);