public void OnImpact(NWPlayer player, NWObject target, int level) { var effectiveStats = _playerStat.GetPlayerItemEffectiveStats(player); int luck = _perk.GetPCPerkLevel(player, PerkType.Lucky) + effectiveStats.Luck; int lightBonus = effectiveStats.LightAbility; int min = 1; float length; int damage; int wisdom = player.WisdomModifier; int intelligence = player.IntelligenceModifier; min += lightBonus / 4 + wisdom / 3 + intelligence / 4; switch (level) { case 1: damage = _random.D4(1, min); length = 3; break; case 2: damage = _random.D4(1, min); length = 6; break; case 3: damage = _random.D6(1, min); length = 6; break; case 4: damage = _random.D8(1, min); length = 6; break; case 5: damage = _random.D8(1, min); length = 9; break; case 6: // Only available with background perk damage = _random.D12(1, min); length = 9; break; default: return; } if (_random.Random(100) + 1 <= luck) { length = length * 2; player.SendMessage("Lucky force push!"); } _.ApplyEffectToObject(DURATION_TYPE_INSTANT, _.EffectDamage(damage, DAMAGE_TYPE_POSITIVE), target); _.ApplyEffectToObject(DURATION_TYPE_TEMPORARY, _.EffectKnockdown(), target, length); _skill.RegisterPCToNPCForSkill(player, target, SkillType.LightSideAbilities); }
private void HealTarget(NWPlayer member, int level, int luck) { int amount; switch (level) { case 1: amount = _random.D12(1); break; case 2: amount = _random.D8(2); break; case 3: amount = _random.D8(3); break; case 4: amount = _random.D8(4); break; case 5: amount = _random.D8(5); break; case 6: amount = _random.D8(6); break; default: return; } if (_random.D100(1) <= luck) { amount *= 2; } _.ApplyEffectToObject(DURATION_TYPE_INSTANT, _.EffectHeal(amount), member); _.ApplyEffectToObject(DURATION_TYPE_INSTANT, _.EffectVisualEffect(VFX_IMP_HEALING_S), member); }
public void OnImpact(NWPlayer player, NWObject target, int level) { var effectiveStats = _playerStat.GetPlayerItemEffectiveStats(player); int lightBonus = effectiveStats.LightAbility; int amount; int length; int dotAmount; int min = 1; int wisdom = player.WisdomModifier; int intelligence = player.IntelligenceModifier; min += lightBonus / 3 + wisdom / 2 + intelligence / 3; switch (level) { case 1: amount = _random.D6(2, min); length = 0; dotAmount = 0; break; case 2: amount = _random.D6(2, min); length = 6; dotAmount = 1; break; case 3: amount = _random.D12(2, min); length = 6; dotAmount = 1; break; case 4: amount = _random.D12(2, min); length = 12; dotAmount = 1; break; case 5: amount = _random.D12(2, min); length = 6; dotAmount = 2; break; case 6: amount = _random.D12(2, min); length = 12; dotAmount = 2; break; case 7: amount = _random.D12(3, min); length = 12; dotAmount = 2; break; case 8: amount = _random.D12(3, min); length = 6; dotAmount = 4; break; case 9: amount = _random.D12(4, min); length = 6; dotAmount = 4; break; case 10: amount = _random.D12(4, min); length = 12; dotAmount = 4; break; case 11: // Only attainable with background bonus amount = _random.D12(5, min); length = 12; dotAmount = 4; break; default: return; } int luck = _perk.GetPCPerkLevel(player, PerkType.Lucky) + effectiveStats.Luck; if (_random.Random(100) + 1 <= luck) { length = length * 2; player.SendMessage("Lucky force breach!"); } Effect damage = _.EffectDamage(amount); _.ApplyEffectToObject(DURATION_TYPE_INSTANT, damage, target.Object); if (length > 0.0f && dotAmount > 0) { _customEffect.ApplyCustomEffect(player, target.Object, CustomEffectType.ForceBreach, length, level, null); } _skill.RegisterPCToAllCombatTargetsForSkill(player, SkillType.LightSideAbilities, target.Object); Effect vfx = _.EffectVisualEffect(VFX_IMP_DOMINATE_S); _.ApplyEffectToObject(DURATION_TYPE_INSTANT, vfx, target.Object); }
private void HealTarget(NWPlayer oPC, NWObject oTarget, int lightBonus, int level) { var effectiveStats = _playerStat.GetPlayerItemEffectiveStats(oPC); int amount; float length; int regenAmount; int min = 1; int wisdom = oPC.WisdomModifier; int intelligence = oPC.IntelligenceModifier; min += lightBonus / 3 + wisdom / 2 + intelligence / 3; switch (level) { case 1: amount = _random.D6(2, min); length = 0.0f; regenAmount = 0; break; case 2: amount = _random.D6(2, min); length = 6.0f; regenAmount = 1; break; case 3: amount = _random.D12(2, min); length = 6.0f; regenAmount = 1; break; case 4: amount = _random.D12(2, min); length = 12.0f; regenAmount = 1; break; case 5: amount = _random.D12(2, min); length = 6.0f; regenAmount = 2; break; case 6: amount = _random.D12(2, min); length = 12.0f; regenAmount = 2; break; case 7: amount = _random.D12(3, min); length = 12.0f; regenAmount = 2; break; case 8: amount = _random.D12(3, min); length = 6.0f; regenAmount = 4; break; case 9: amount = _random.D12(4, min); length = 6.0f; regenAmount = 4; break; case 10: amount = _random.D12(4, min); length = 12.0f; regenAmount = 4; break; case 11: // Only attainable with background bonus amount = _random.D12(5, min); length = 12.0f; regenAmount = 4; break; default: return; } int luck = _perk.GetPCPerkLevel(oPC, PerkType.Lucky) + effectiveStats.Luck; if (_random.Random(100) + 1 <= luck) { length = length * 2; oPC.SendMessage("Lucky heal!"); } Effect heal = _.EffectHeal(amount); _.ApplyEffectToObject(DURATION_TYPE_INSTANT, heal, oTarget.Object); if (length > 0.0f && regenAmount > 0) { Effect regen = _.EffectRegenerate(regenAmount, 1.0f); _.ApplyEffectToObject(DURATION_TYPE_TEMPORARY, regen, oTarget.Object, length + 0.1f); } Effect vfx = _.EffectVisualEffect(VFX_IMP_HEALING_M); _.ApplyEffectToObject(DURATION_TYPE_INSTANT, vfx, oTarget.Object); }
public void OnImpact(NWPlayer player, NWObject target, int level) { var effectiveStats = _playerStat.GetPlayerItemEffectiveStats(player); int darkBonus = effectiveStats.DarkAbility; int amount; int length; int dotAmount; int min = 1; int wisdom = player.WisdomModifier; int intelligence = player.IntelligenceModifier; min += darkBonus / 3 + intelligence / 2 + wisdom / 3; switch (level) { case 1: amount = _random.D6(2, min); length = 0; dotAmount = 0; break; case 2: amount = _random.D6(2, min); length = 6; dotAmount = 1; break; case 3: amount = _random.D12(2, min); length = 6; dotAmount = 1; break; case 4: amount = _random.D12(2, min); length = 12; dotAmount = 1; break; case 5: amount = _random.D12(2, min); length = 6; dotAmount = 2; break; case 6: amount = _random.D12(2, min); length = 12; dotAmount = 2; break; case 7: amount = _random.D12(3, min); length = 12; dotAmount = 2; break; case 8: amount = _random.D12(3, min); length = 6; dotAmount = 4; break; case 9: amount = _random.D12(4, min); length = 6; dotAmount = 4; break; case 10: amount = _random.D12(4, min); length = 12; dotAmount = 4; break; case 11: // Only attainable with background bonus amount = _random.D12(5, min); length = 12; dotAmount = 4; break; default: return; } int luck = _perk.GetPCPerkLevel(player, PerkType.Lucky) + effectiveStats.Luck; if (_random.Random(100) + 1 <= luck) { length = length * 2; player.SendMessage("Lucky force lightning!"); } player.AssignCommand(() => { Effect damage = _.EffectDamage(amount, DAMAGE_TYPE_ELECTRICAL); _.ApplyEffectToObject(DURATION_TYPE_INSTANT, damage, target); }); if (length > 0.0f && dotAmount > 0) { _customEffect.ApplyCustomEffect(player, target.Object, CustomEffectType.ForceShock, length, level, dotAmount.ToString()); } _skill.RegisterPCToAllCombatTargetsForSkill(player, SkillType.DarkSideAbilities, target.Object); player.AssignCommand(() => { _.ApplyEffectToObject(DURATION_TYPE_TEMPORARY, _.EffectVisualEffect(VFX_BEAM_LIGHTNING), target, 1.0f); }); }