Example #1
0
        public void Spell(WiccanRede.AI.ActionInfo info)
        {
            Vector3 pos = player.GetPosition();

            //Logging.Logger.AddInfo(info.ToString());
            pos.Y += 50;

            Vector3 dir = info.targetPosition - pos;

            dir.Normalize();

            player.SetDirection(dir);
            logic.Spell(info);
        }
Example #2
0
 /// <summary>
 /// take action from game - this mean for example damage for NPC from player
 /// </summary>
 /// <param name="npcName">NPC which is affected</param>
 /// <param name="info">info about action</param>
 public void AcceptAction(string npcName, ActionInfo info)
 {
     if (npcName == "Player")
     {
         this.player.SufferDamage(info.action.enemyHpTaken);
         this.player.DrainMana(info.action.enemyManaDrain);
         return;
     }
     foreach (NPC npc in this.npcs)
     {
         if (npc.character.name == npcName)
         {
             npc.SufferDamage(info.action.enemyHpTaken);
             npc.DrainMana(info.action.enemyManaDrain);
             if (npc.TargetedEnemy == null)
             {
                 npc.RegisterAttack(this.player);
             }
             break;
         }
     }
 }
Example #3
0
 public void Spell(ActionInfo info)
 {
 }