Exemplo n.º 1
0
 public void Execute()
 {
     sUI = Camera.mainCamera.GetComponent <SkillSlidingUI>();
     if (transform.GetComponent <SkillProperty>().PassSkillRate)
     {
         Player = transform.parent.parent.GetComponent <CharacterProperty>().Player;
         if (selectedMap != null)
         {
             if (Player == 1)
             {
                 mapStorage.PlayerATerritory.Add(selectedMap);
                 mapStorage.PlayerBTerritory.Remove(selectedMap);
                 print("Stealed playerB's map!");
             }
             else if (Player == 2)
             {
                 mapStorage.PlayerBTerritory.Add(selectedMap);
                 mapStorage.PlayerATerritory.Remove(selectedMap);
                 print("Stealed playerA's map!");
             }
         }
         SkillUI sui = new SkillUI(selectedMap, true, "map stealed");
         sUI.UIItems.Add(sui);
         sUI.FadeInUI = true;
     }
     else
     {
         SkillUI sui = new SkillUI(transform.parent.parent, false, "");
         sUI.UIItems.Add(sui);
         sUI.FadeInUI = true;
         print("Stealed nothing!");
     }
 }
Exemplo n.º 2
0
    public void Execute()
    {
        sUI = Camera.mainCamera.GetComponent<SkillSlidingUI>();
        if(transform.GetComponent<SkillProperty>().PassSkillRate){
            Player = transform.parent.parent.GetComponent<CharacterProperty>().Player;
            Transform target = null;
            Transform stealer = null;
            if(Player == 1){
                stealer = playerA;
                target = playerB;
            }else{
                stealer = playerB;
                target = playerA;
            }

            ManaCounter manaA = stealer.GetComponent<ManaCounter>();
            ManaCounter manaB = target.GetComponent<ManaCounter>();

            if(manaB.Mana>0){
                manaA.Mana += 1;
                manaB.Mana -= 1;
                SkillUI sui = new SkillUI(transform.parent.parent, true, "Mana +1");
                sUI.UIItems.Add(sui);
                sUI.FadeInUI = true;
                print("Mana stealed!");
            }else{
                SkillUI sui = new SkillUI(transform.parent.parent, true, "");
                sUI.UIItems.Add(sui);
                sUI.FadeInUI = true;
                print("No mana to steal!");
            }
        }else{
            print("Stealed nothing!");
        }
    }
Exemplo n.º 3
0
 public void Execute()
 {
     sUI    = Camera.mainCamera.GetComponent <SkillSlidingUI>();
     Player = transform.parent.parent.GetComponent <CharacterProperty>().Player;
     if (transform.GetComponent <SkillProperty>().PassSkillRate)
     {
         CharacterProperty targetProperty = target.GetComponent <CharacterProperty>();
         targetProperty.Moved        = false;
         targetProperty.Activated    = false;
         targetProperty.Attacked     = false;
         targetProperty.TurnFinished = false;
         SkillUI sui = new SkillUI(target, true, "Controlled");
         sUI.UIItems.Add(sui);
         sUI.FadeInUI = true;
         if (Player == 1)
         {
             chessStorage.PlayerAChesses.Add(target);
             chessStorage.PlayerBChesses.Remove(target);
             targetProperty.Player = 1;
         }
         else if (Player == 2)
         {
             chessStorage.PlayerBChesses.Add(target);
             chessStorage.PlayerAChesses.Remove(target);
             targetProperty.Player = 2;
         }
     }
     else
     {
         SkillUI sui = new SkillUI(transform.parent.parent, false, "");
         sUI.UIItems.Add(sui);
         sUI.FadeInUI = true;
         print("Stealing failed");
     }
 }
Exemplo n.º 4
0
 public void Execute()
 {
     sUI = Camera.mainCamera.GetComponent<SkillSlidingUI>();
     Player = transform.parent.parent.GetComponent<CharacterProperty>().Player;
     if(transform.GetComponent<SkillProperty>().PassSkillRate){
         CharacterProperty targetProperty = target.GetComponent<CharacterProperty>();
         targetProperty.Moved = false;
         targetProperty.Activated = false;
         targetProperty.Attacked = false;
         targetProperty.TurnFinished = false;
         SkillUI sui = new SkillUI(target, true, "Controlled");
         sUI.UIItems.Add(sui);
         sUI.FadeInUI = true;
         if(Player == 1){
             chessStorage.PlayerAChesses.Add(target);
             chessStorage.PlayerBChesses.Remove(target);
             targetProperty.Player = 1;
         }else if(Player == 2){
             chessStorage.PlayerBChesses.Add(target);
             chessStorage.PlayerAChesses.Remove(target);
             targetProperty.Player = 2;
         }
     }else{
         SkillUI sui = new SkillUI(transform.parent.parent, false, "");
         sUI.UIItems.Add(sui);
         sUI.FadeInUI = true;
         print("Stealing failed");
     }
 }
Exemplo n.º 5
0
    public void Execute()
    {
        sUI = Camera.mainCamera.GetComponent <SkillSlidingUI>();
        if (transform.GetComponent <SkillProperty>().PassSkillRate)
        {
            Player = transform.parent.parent.GetComponent <CharacterProperty>().Player;
            Transform target  = null;
            Transform stealer = null;
            if (Player == 1)
            {
                stealer = playerA;
                target  = playerB;
            }
            else
            {
                stealer = playerB;
                target  = playerA;
            }

            ManaCounter manaA = stealer.GetComponent <ManaCounter>();
            ManaCounter manaB = target.GetComponent <ManaCounter>();

            if (manaB.Mana > 0)
            {
                manaA.Mana += 1;
                manaB.Mana -= 1;
                SkillUI sui = new SkillUI(transform.parent.parent, true, "Mana +1");
                sUI.UIItems.Add(sui);
                sUI.FadeInUI = true;
                print("Mana stealed!");
            }
            else
            {
                SkillUI sui = new SkillUI(transform.parent.parent, true, "");
                sUI.UIItems.Add(sui);
                sUI.FadeInUI = true;
                print("No mana to steal!");
            }
        }
        else
        {
            print("Stealed nothing!");
        }
    }
Exemplo n.º 6
0
 public void Execute()
 {
     sUI = Camera.mainCamera.GetComponent<SkillSlidingUI>();
     CharacterProperty targetProperty = target.GetComponent<CharacterProperty>();
     if(transform.GetComponent<SkillProperty>().PassSkillRate){
         targetProperty.UnStatusCounter[UnnormalStatus.Poisoned] = 2;
         targetProperty.LastUnStatusCounter[UnnormalStatus.Poisoned] = 3;
         targetProperty.UnStatus = true;
         print("Poisoned target");
         SkillUI sui = new SkillUI(target, true, "poisoned");
         sUI.UIItems.Add(sui);
         sUI.FadeInUI = true;
     }else{
         SkillUI sui = new SkillUI(attacker, false, "");
         sUI.UIItems.Add(sui);
         sUI.FadeInUI = true;
         print("Poison failed");
     }
 }
Exemplo n.º 7
0
    public void Execute()
    {
        sUI = Camera.mainCamera.GetComponent <SkillSlidingUI>();
        CharacterProperty targetProperty = target.GetComponent <CharacterProperty>();

        if (transform.GetComponent <SkillProperty>().PassSkillRate)
        {
            targetProperty.UnStatusCounter[UnnormalStatus.Poisoned]     = 2;
            targetProperty.LastUnStatusCounter[UnnormalStatus.Poisoned] = 3;
            targetProperty.UnStatus = true;
            print("Poisoned target");
            SkillUI sui = new SkillUI(target, true, "poisoned");
            sUI.UIItems.Add(sui);
            sUI.FadeInUI = true;
        }
        else
        {
            SkillUI sui = new SkillUI(attacker, false, "");
            sUI.UIItems.Add(sui);
            sUI.FadeInUI = true;
            print("Poison failed");
        }
    }
Exemplo n.º 8
0
    public void Execute()
    {
        sUI = Camera.mainCamera.GetComponent <SkillSlidingUI>();
        int Player = transform.parent.GetComponent <CharacterProperty>().Player;
        CharacterProperty targetProperty = target.GetComponent <CharacterProperty>();

        if (transform.GetComponent <SkillProperty>().PassSkillRate)
        {
            if (Player == 1)
            {
                chessStorage.PlayerAChesses.Add(target);
                chessStorage.PlayerBChesses.Remove(target);
                targetProperty.Player = 1;
            }
            else if (Player == 2)
            {
                chessStorage.PlayerBChesses.Add(target);
                chessStorage.PlayerAChesses.Remove(target);
                targetProperty.Player = 2;
            }
            targetProperty.UnStatusCounter[UnnormalStatus.Chaos]     = 2;
            targetProperty.LastUnStatusCounter[UnnormalStatus.Chaos] = 2;
            targetProperty.UnStatus = true;
            SkillUI sui = new SkillUI(target, true, "Chaos");
            sUI.UIItems.Add(sui);
            sUI.FadeInUI = true;
            print("Target get chaos!!");
        }
        else
        {
            SkillUI sui = new SkillUI(attacker, false, "");
            sUI.UIItems.Add(sui);
            sUI.FadeInUI = true;
            print("Chaos failed");
        }
    }