private int CheckCastBuffers(int _cast) { CasterBuff temp = GameCore.Core.buffSystem.FindBuff(CASTERBUFF.CONSECRATION); if ((temp != null) && (_cast > 0)) { if (spell.ID == SPELL.WORD_OF_KINGS_FAITH) { _cast /= 2; temp.Remove(); } } if (caster.myAura[(int)AURA.FLASH_OF_FUTURE].isActive) { if (spell.ID == SPELL.WORD_OF_KINGS_FAITH) { CasterBuff myb = GameCore.Core.buffSystem.FindBuff(CASTERBUFF.FLASH_OF_FUTURE_FAITH); if (myb != null) { myb.Remove(); _cast = 0; } } } return(_cast); }
public override void Execute(Caster who, Soldier target, int minval = 0, int maxval = 0) { int _value = 0; SpellInfo spellInfo = GameCore.Core.spellRepository.Get(SPELL.WORD_OF_KINGS_LIGHT); _value = spellInfo.baseValue; _value += (int)(GameCore.Core.chosenAccount.statPWR * spellInfo.coeff); if (who.myAura[(int)AURA.FLASH_OF_FUTURE].isActive) { CasterBuff myb = GameCore.Core.buffSystem.FindBuff(CASTERBUFF.FLASH_OF_FUTURE_LIGHT); if (myb != null) { myb.Remove(); _value *= 2; } } Healing temp; temp = target.Heal(_value, _value + 5, GameCore.Core.criticalStrikeChance, who, spellInfo, HEALSOURCE.WOK_LIGHT, spellInfo.healtype); if (who.myAura[(int)AURA.AURA_OF_LIGHT].isActive) { int chance = 10; if (temp.isCrit) { chance += who.myAura[(int)AURA.AURA_OF_LIGHT].stacks * VALUES.AURA_OF_LIGHT_INCREASE; } if (Random.Range(0, 100) < 30 + who.myAura[(int)AURA.AURA_OF_LIGHT].stacks) { GameCore.Core.FindSpellByName("Word of Kings: Courage").ChangeCooldown(0f); } } if (who.myAura[(int)AURA.DIVINITY].isActive) { if (temp.isCrit) { target.Shield((int)(temp.value * VALUES.DIVINITY_PERCENT), HEALSOURCE.DIVNITY_SHIELD); } } if (who.myAura[(int)AURA.IRON_FAITH].isActive) { Buff myb = target.effectSystem.FindBuff((int)Buff.DB.WORD_OF_KINGS_FAITH); if (myb != null) { myb.Refresh(0); } } if (!target.frame.GetComponent <AudioSource>().isPlaying) { target.frame.GetComponent <AudioSource>().PlayOneShot(Resources.Load <AudioClip>("Sounds/WoKLightSound")); } GameObject.Instantiate(Resources.Load("Animations/lightexplosion_0"), target.frame.transform.position + new Vector3(0, 0.35f, 0), Quaternion.Euler(0, 0, 0)); }
private bool ConsumeCasterBuff(CASTERBUFF myb) { CasterBuff temp = buffSystem.FindBuff(myb); if (temp != null) { temp.Remove(); return(true); } return(false); }