コード例 #1
0
 // is "spell" aura is on the enemy team or on the enemy active pet?
 public static bool debuff(string spell)
 {
     return(MyPets.debuff(spell));
 }
コード例 #2
0
 // number of turns left for such an aura (-1 if the aura is absent)
 public static int debuffLeft(string spell)
 {
     return(MyPets.debuffLeft(spell));
 }
コード例 #3
0
 public static bool myPetHasAbility(string ability)
 {
     return(MyPets.myPetHasAbility(ability));
 }
コード例 #4
0
 // checking if our ability is weak against the current enemy pet
 public static bool weak(string ability)
 {
     return(MyPets.IsWeak(ability));
 }
コード例 #5
0
 // checking if our ability is strong against the current enemy pet
 public static bool strong(string ability)
 {
     return(MyPets.IsStrong(ability));
 }
コード例 #6
0
        public void Load(PetPlace[] selectedpets)
        {
            int slot = 1;

            while (slot <= 3)
            {
                if ((slot == 1 && PluginSettings.Instance.LockFirstSlot) ||
                    (slot == 2 && PluginSettings.Instance.LockSecondSlot) ||
                    (slot == 3 && PluginSettings.Instance.LockThirdSlot))
                {
                    Logger.Write(string.Format("Filling pet Slot {0} -- locked. Keeping {1}", slot, MyPets.Pet(slot - 1).Name));
                }
                else
                {
                    if (selectedpets[slot - 1].opened)
                    {
                        if (selectedpets[slot - 1].opened)
                        {
                            _petLua.LoadPet(slot, selectedpets[slot - 1].pet.PetId);
                            Logger.Write(string.Format("Filling pet Slot {0} with {1}", slot, selectedpets[slot - 1].pet.ToString()));
                        }
                        else
                        {
                            Logger.Write(string.Format("Filling pet Slot {0} -- nothing selected, unchanged", slot));
                        }
                    }
                    else
                    {
                        return;
                    }
                }

                slot++;
            }
        }
コード例 #7
0
 private void CopyCurrentPet(int slot)
 {
     _selectedpets[slot].pet.PetId = MyPets.Pet(slot).PetID;
     _selectedpets[slot].pet.SetStatsInvalid();  // Only ID is needed, but just in case.
 }