public float HealingMultiplier() { float _value = 1f; BuffHandler buffSystem = core.buffSystem; if (buffSystem.FindBuff(CASTERBUFF.VISIONS_OF_ANCIENT_KINGS) != null) { _value *= (1.3f + myAura[(int)AURA.VISIONS_OF_ANCIENT_KINGS].stacks * VALUES.VOAK_INCREASE); } if (buffSystem.FindBuff(CASTERBUFF.DIVINE_INTERVENTION) != null) { _value *= 1.5f; } if (myTalentTree.GetTalentByName("Trauma") != null) { _value *= 1 + (ManaMax - ManaCurrent) / ManaMax * 0.5f; } if (myTalentTree.GetTalentByName("Book of Prime Shadows") != null) { CasterBuff myb = buffSystem.FindBuff(CASTERBUFF.BOOK_OF_PRIME_SHADOWS); if (myb != null) { _value *= 1 + myb.stacks * 0.01f; } } return(_value); }
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); }
private Healing ApplyHealingModifiersByBuff(HEALSOURCE source, Healing baseHeal, Caster _caster) { Healing newHealing = baseHeal; if (source == HEALSOURCE.WOK_LIGHT) { Buff _myb = soldier.effectSystem.FindBuff(BUFF.FAITH); if ((_myb != null)) { SpellInfo spellInfo = GameCore.Core.spellRepository.Get(SPELL.WORD_OF_KINGS_FAITH); int _dur = spellInfo.ticksCount * spellInfo.HoTgap; int _gap = spellInfo.HoTgap; GameCore.Core.paladinSparkHandler.AddSparks(1); soldier.effectSystem.BuffMe(BUFF.WORD_OF_KINGS_FAITH, _dur, _caster, spellInfo, _gap); } CasterBuff _casterBuff = GameCore.Core.buffSystem.FindBuff(CASTERBUFF.DIVINE_INTERVENTION); if (baseHeal.isCrit) { if (_casterBuff != null) { baseHeal.value = (int)((float)baseHeal.value * (1f + (float)_caster.GetFocus() / 100f)); } } } return(newHealing); }
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); }
// --- Metoda ktora wypelnia dwie tablice: tablice zycia graczy (SoldierHealth) oraz tablice graczy (SoldierOrder) private float GetManaCost(Spell _spell) { float _manacost; _manacost = _spell.manacost; CasterBuff myb = buffSystem.FindBuff(CASTERBUFF.BOOK_OF_PRIME_SHADOWS); if (myb != null) { _manacost = _manacost + _manacost * myb.stacks * 0.01f; } return(_manacost); }
public void BuffMe(CASTERBUFF bufftype, float buffdur, Caster _caster, int startingStacks = 1) { CasterBuff myBuff = FindBuff(bufftype); if (myBuff == null) { Buffs[BuffsAmount] = new CasterBuff(bufftype, buffdur, _caster); Buffs[BuffsAmount].stacks = startingStacks; Buffs[BuffsAmount].icon = Object.Instantiate(Resources.Load("CasterBuffIcon"), basePos + new Vector3(0.25f * BuffsAmount, 0, 0), GameCore.zero) as GameObject; //Buffs[BuffsAmount].myText = Object.Instantiate(Resources.Load("BuffDurationText"), basePos + new Vector3(0.1f + 0.25f * BuffsAmount, -0.1f, -1), GameCore.zero) as GameObject; Buffs[BuffsAmount].icon.GetComponent <Image>().sprite = CasterBuff.GetCasterBuffResource(bufftype); Buffs[BuffsAmount].icon.transform.SetParent(GameObject.Find("Canvas").transform); Buffs[BuffsAmount].icon.transform.localScale = new Vector3(1, 1, 1); Buffs[BuffsAmount].icon.GetComponent <BuffScript>().myid = BuffsAmount; BuffsAmount++; } else { myBuff.Refresh(0); } }