Exemplo n.º 1
0
 public void AwardXP(Monster winner, Monster loser)
 {
     // TODO: Implement better XP logic
     int levelDifference = winner.monsterLevel - loser.monsterLevel;
     int xpGain = levelDifference <= -3 ? 100 : levelDifference >= 3 ? 0 : 100 / (levelDifference + 3);
     winner.XP = winner.XP + xpGain > winner.maxXP ? winner.maxXP : winner.XP + xpGain;
 }
Exemplo n.º 2
0
 public void FightItOut(Monster first, Monster second)
 {
     this.firstCombatant = first;
     this.secondCombatant = second;
     this.elapsedTime = 0.0;
     this.attacks = CalculateAttacks();
     this.attackFrequency = fightLength / attacks.Count;
     this.attackTimer = 0.0;
 }
Exemplo n.º 3
0
        bool FindMove(Monster monster)
        {
            // Grab move options for monster

            // Decide on priority
            // 1. Occupy tower
            // 2. Kill enemies
            // 3. Move toward enemy summoner
            if (monster.remainingMovement > 0)
            {
                double[,] map = Map.getInstance().MapForAI(monster);
                movedThisTurn[monster] = true;
            }

            return false;
        }
Exemplo n.º 4
0
 public MonsterStatusDialog(Monster monster)
     : base(Settings.SCREEN_WIDTH - (MonsterStatusDialog.statusWidth + 32),
         Settings.SCREEN_HEIGHT - (MonsterStatusDialog.statusHeight + 32),
         MonsterStatusDialog.statusWidth,
         MonsterStatusDialog.statusHeight)
 {
     this.monster = monster;
     this.visible = false;
 }
Exemplo n.º 5
0
 public MonsterStatusDialog MakeMonsterStatusDialog(Monster monster)
 {
     MonsterStatusDialog dialog = new MonsterStatusDialog(monster);
     monsterStatusDialogCollection.Add(dialog);
     return dialog;
 }
Exemplo n.º 6
0
 public void Kill(Monster monster)
 {
     this.monsterCollection.Remove(monster);
 }
Exemplo n.º 7
0
 public void PlanRoute(Monster monster, int x, int y)
 {
     if (x >= 0 && x < this.width && y >= 0 && y < this.height)
     {
         previewRoute = new Route(monster, x, y);
     }
 }
Exemplo n.º 8
0
        public double[,] MapForAI(Monster monster)
        {
            bool[,] teammateMap = GetActorLocations(monster.TileX, monster.TileY, monster.player);
            double[,] moveMap = GetMovementMap(monster.TileX, monster.TileY, null, 30.0, teammateMap);

            return moveMap;
        }