public void SetFireInteractions(CharacterStats targetCharacterStats, object source, int burnDamage, bool fromCell = false) { if (targetCharacterStats.stateManager.statusEffects.Contains(StatusEffect.Wet)) { targetCharacterStats.stateManager.statusEffects.Remove(StatusEffect.Wet); } else if (targetCharacterStats.stateManager.statusEffects.Contains(StatusEffect.Frozen)) { targetCharacterStats.stateManager.statusEffects.Remove(StatusEffect.Wet); } else { if (fromCell) { GridCell cell = (GridCell)source; if (targetCharacterStats.stateManager.statusEffects.Contains(StatusEffect.Oiled) || cell.alchemyState.fireState == FireState.Inferno) { targetCharacterStats.stateManager.statusEffects.Add(StatusEffect.Inferno); ActivateVFX.Instance.ActivateElementalEffect(StatusEffect.Inferno, targetCharacterStats.gameObject); targetCharacterStats.stateManager.statusEffects.Remove(StatusEffect.Oiled); StatModifier burnDamageMod = new StatModifier(burnDamage * .5f, StatModType.Flat, cell.burnSource); targetCharacterStats.stateManager.burnDamageOverTime.AddModifier(burnDamageMod); targetCharacterStats.stateManager.DamageSourceTurns.Add(cell.burnSource, (CombatStatType.fireDamage, 3)); } else { targetCharacterStats.stateManager.statusEffects.Add(StatusEffect.Burning); ActivateVFX.Instance.ActivateElementalEffect(StatusEffect.Burning, targetCharacterStats.gameObject); StatModifier burnDamageMod = new StatModifier(burnDamage * .25f, StatModType.Flat, cell.burnSource); targetCharacterStats.stateManager.burnDamageOverTime.AddModifier(burnDamageMod); targetCharacterStats.stateManager.DamageSourceTurns.Add(cell.burnSource, (CombatStatType.fireDamage, 3)); } } else { if (targetCharacterStats.stateManager.statusEffects.Contains(StatusEffect.Oiled)) { targetCharacterStats.stateManager.statusEffects.Add(StatusEffect.Inferno); ActivateVFX.Instance.ActivateElementalEffect(StatusEffect.Inferno, targetCharacterStats.gameObject); targetCharacterStats.stateManager.statusEffects.Remove(StatusEffect.Oiled); StatModifier burnDamageMod = new StatModifier(burnDamage * .5f, StatModType.Flat, source); targetCharacterStats.stateManager.burnDamageOverTime.AddModifier(burnDamageMod); targetCharacterStats.stateManager.DamageSourceTurns.Add(source, (CombatStatType.fireDamage, 3)); } else if (Random.value >= .5f) { ActivateVFX.Instance.ActivateElementalEffect(StatusEffect.Burning, targetCharacterStats.gameObject); targetCharacterStats.stateManager.statusEffects.Add(StatusEffect.Burning); StatModifier burnDamageMod = new StatModifier(burnDamage * .25f, StatModType.Flat, source); targetCharacterStats.stateManager.burnDamageOverTime.AddModifier(burnDamageMod); if (targetCharacterStats.stateManager.DamageSourceTurns.ContainsKey(source)) { targetCharacterStats.stateManager.DamageSourceTurns.Remove(source); } targetCharacterStats.stateManager.DamageSourceTurns.Add(source, (CombatStatType.fireDamage, 3)); } } } }
public void Start() { characterStats = GetComponent <CharacterStats>(); }
public void SetShockInteractions(CharacterStats targetCharacterStats, bool fromCell = false) { }