private static void Poisona(AbilityBuilder builder) { builder.Create(Feat.Poisona, PerkType.Poisona) .Name("Poisona") .HasRecastDelay(RecastGroup.Raise, 60f) .HasActivationDelay(1f) .RequirementMP(4) .UsesActivationType(AbilityActivationType.Casted) .HasCustomValidation((activator, target, level) => { if (!StatusEffect.HasStatusEffect(target, StatusEffectType.Poison1) && !StatusEffect.HasStatusEffect(target, StatusEffectType.Poison2) && !StatusEffect.HasStatusEffect(target, StatusEffectType.Poison3)) { return("Your target is not poisoned."); } return(string.Empty); }) .HasImpactAction((activator, target, level) => { StatusEffect.Remove(target, StatusEffectType.Poison1); StatusEffect.Remove(target, StatusEffectType.Poison2); StatusEffect.Remove(target, StatusEffectType.Poison3); ApplyEffectToObject(DurationType.Instant, EffectVisualEffect(VisualEffect.Vfx_Imp_Head_Nature), target); CombatPoint.AddCombatPointToAllTagged(activator, SkillType.WhiteMagic, 3); Enmity.ModifyEnmity(activator, target, 6); }); }
private static void Provoke2(AbilityBuilder builder) { builder.Create(Feat.Provoke2, PerkType.Provoke) .Name("Provoke II") .HasRecastDelay(RecastGroup.Provoke2, 90f) .RequirementStamina(15) .UsesActivationType(AbilityActivationType.Casted) .HasImpactAction((activator, target, level) => { var nth = 1; var nearby = GetNearestCreature(CreatureType.IsAlive, 1, target, nth); while (GetIsObjectValid(nearby)) { if (GetDistanceBetween(target, nearby) > 5.0f) { break; } ApplyEffectToObject(DurationType.Instant, EffectVisualEffect(VisualEffect.Vfx_Imp_Destruction), nearby); Enmity.ModifyEnmity(activator, nearby, 30); nth++; nearby = GetNearestCreature(CreatureType.IsAlive, 1, target, nth); } }); }
private static void Curaga1(AbilityBuilder builder) { builder.Create(Feat.Curaga1, PerkType.Curaga) .Name("Curaga I") .HasRecastDelay(RecastGroup.Curaga1, 12f) .HasActivationDelay(4.0f) .RequirementMP(12) .UsesActivationType(AbilityActivationType.Casted) .DisplaysVisualEffectWhenActivating() .HasImpactAction((activator, target, level) => { var bonus = GetAbilityModifier(AbilityType.Wisdom, activator); foreach (var member in Party.GetAllPartyMembersWithinRange(activator, 5.0f)) { var amount = Random.D6(2) + bonus; ApplyEffectToObject(DurationType.Instant, GetRacialType(target) == RacialType.Undead ? EffectDamage(amount) : EffectHeal(amount), target); ApplyEffectToObject(DurationType.Instant, EffectVisualEffect(VisualEffect.Vfx_Imp_Healing_S), member); Enmity.ModifyEnmityOnAll(activator, amount); } CombatPoint.AddCombatPointToAllTagged(activator, SkillType.WhiteMagic, 3); }); }
private static void Cover3(AbilityBuilder builder) { builder.Create(Feat.Cover3, PerkType.Cover) .Name("Cover III") .HasRecastDelay(RecastGroup.Cover, 120f) .RequirementStamina(12) .UsesActivationType(AbilityActivationType.Casted) .DisplaysVisualEffectWhenActivating(VisualEffect.None) .HasCustomValidation((activator, target, level) => { if (activator == target) { return("You cannot Cover yourself."); } return(string.Empty); }) .HasImpactAction((activator, target, level) => { var length = 60f + GetAbilityModifier(AbilityType.Constitution, activator) * 2f; StatusEffect.Apply(activator, target, StatusEffectType.Cover3, length); ApplyEffectToObject(DurationType.Instant, EffectVisualEffect(VisualEffect.Vfx_Dur_Prot_Epic_Armor), target); Enmity.ModifyEnmityOnAll(activator, 10); CombatPoint.AddCombatPointToAllTagged(activator, SkillType.Chivalry, 3); }); }
private static void RecoveryStab3(AbilityBuilder builder) { builder.Create(Feat.RecoveryStab3, PerkType.RecoveryStab) .Name("Recovery Stab III") .HasRecastDelay(RecastGroup.RecoveryStab, 60f) .RequirementStamina(16) .UsesActivationType(AbilityActivationType.Weapon) .HasImpactAction((activator, target, level) => { var bonus = GetAbilityModifier(AbilityType.Wisdom, activator); foreach (var member in Party.GetAllPartyMembersWithinRange(activator, 5.0f)) { var amount = Random.D8(3) + bonus; var duration = 24f; if (StatusEffect.HasStatusEffect(activator, StatusEffectType.DeliberateStab)) { duration *= 2f; } ApplyEffectToObject(DurationType.Instant, EffectHeal(amount), member); ApplyEffectToObject(DurationType.Instant, EffectVisualEffect(VisualEffect.Vfx_Imp_Healing_S), member); ApplyEffectToObject(DurationType.Temporary, EffectRegenerate(1, 6f), member, duration); Enmity.ModifyEnmityOnAll(activator, amount + 6); } CombatPoint.AddCombatPointToAllTagged(activator, SkillType.RedMagic, 3); Enmity.ModifyEnmityOnAll(activator, 10); }); }
private static void Flash2(AbilityBuilder builder) { builder.Create(Feat.Flash2, PerkType.Flash) .Name("Flash II") .HasRecastDelay(RecastGroup.Flash, 60f) .RequirementStamina(20) .UsesActivationType(AbilityActivationType.Casted) .HasImpactAction((activator, target, level) => { var nth = 1; var nearby = GetNearestCreature(Type.IsAlive, 1, target, nth); while (GetIsObjectValid(nearby)) { if (GetDistanceBetween(target, nearby) > 5.0f) { break; } ApplyEffectToObject(DurationType.Instant, EffectVisualEffect(VisualEffect.Vfx_Imp_Pdk_Generic_Head_Hit), nearby); StatusEffect.Apply(activator, nearby, StatusEffectType.Blind2, 45f); Enmity.ModifyEnmity(activator, nearby, 50); nth++; nearby = GetNearestCreature(Type.IsAlive, 1, target, nth); } ApplyEffectToObject(DurationType.Instant, EffectVisualEffect(VisualEffect.Vfx_Imp_Pdk_Generic_Pulse), activator); }); }
private static void TransferStamina1(AbilityBuilder builder) { builder.Create(Feat.TransferStamina1, PerkType.TransferStamina) .Name("Transfer Stamina I") .HasRecastDelay(RecastGroup.Transfer, 60f) .RequirementMP(20) .UsesActivationType(AbilityActivationType.Casted) .HasActivationDelay(4f) .HasCustomValidation((activator, target, level) => { if (!GetIsPC(target) || GetIsDM(target)) { return("Only players may be targeted with this ability."); } return(string.Empty); }) .HasImpactAction((activator, target, level) => { const int BaseTransferAmount = 10; var playerId = GetObjectUUID(target); var dbPlayer = DB.Get <Player>(playerId); Stat.RestoreStamina(target, dbPlayer, BaseTransferAmount); DB.Set(playerId, dbPlayer); CombatPoint.AddCombatPointToAllTagged(activator, SkillType.RedMagic, 2); Enmity.ModifyEnmityOnAll(activator, 6); }); }
private static void Raise(AbilityBuilder builder) { builder.Create(Feat.Raise, PerkType.Raise) .Name("Raise I") .HasRecastDelay(RecastGroup.Raise, 60f) .HasActivationDelay(15f) .RequirementMP(25) .UsesActivationType(AbilityActivationType.Casted) .HasCustomValidation((activator, target, level) => { if (GetCurrentHitPoints(target) > -11 || !GetIsDead(target)) { return("Your target is still alive."); } return(string.Empty); }) .HasImpactAction((activator, target, level) => { ApplyEffectToObject(DurationType.Instant, EffectResurrection(), target); CombatPoint.AddCombatPointToAllTagged(activator, SkillType.WhiteMagic, 5); Enmity.ModifyEnmityOnAll(activator, 60); }); }
private static void Convert(AbilityBuilder builder) { builder.Create(Feat.Convert, PerkType.Convert) .Name("Convert") .HasRecastDelay(RecastGroup.Convert, 600f) .UsesActivationType(AbilityActivationType.Casted) .HasCustomValidation((activator, target, level) => { if (!GetIsPC(activator) || GetIsDM(activator)) { return("Only players may use this ability."); } var playerId = GetObjectUUID(activator); var dbPlayer = DB.Get <Player>(playerId); if (dbPlayer.MP <= 0) { return("Your MP is too low to convert."); } return(string.Empty); }) .HasImpactAction((activator, target, level) => { var playerId = GetObjectUUID(activator); var dbPlayer = DB.Get <Player>(playerId); var currentHP = GetCurrentHitPoints(activator); var currentMP = dbPlayer.MP; // Set MP to 0 then do a restore by the player's HP. dbPlayer.MP = 0; Stat.RestoreMP(activator, dbPlayer, currentHP); DB.Set(playerId, dbPlayer); // Current HP is higher than MP. Deal damage. if (currentHP > currentMP) { var damageAmount = currentHP - currentMP; ApplyEffectToObject(DurationType.Instant, EffectDamage(damageAmount), activator); } // Current HP is lower than MP. Heal damage. else if (currentHP < currentMP) { var recoverAmount = currentMP - currentHP; ApplyEffectToObject(DurationType.Instant, EffectHeal(recoverAmount), activator); } ApplyEffectToObject(DurationType.Instant, EffectVisualEffect(VisualEffect.Vfx_Imp_Good_Help), activator); CombatPoint.AddCombatPointToAllTagged(activator, SkillType.RedMagic, 5); Enmity.ModifyEnmityOnAll(activator, 10); }); }
private static void Provoke1(AbilityBuilder builder) { builder.Create(Feat.Provoke1, PerkType.Provoke) .Name("Provoke I") .HasRecastDelay(RecastGroup.Provoke1, 30f) .RequirementStamina(2) .UsesActivationType(AbilityActivationType.Casted) .HasImpactAction((activator, target, level) => { ApplyEffectToObject(DurationType.Instant, EffectVisualEffect(VisualEffect.Vfx_Imp_Destruction), target); Enmity.ModifyEnmity(activator, target, 50); }); }
private static void LifeSteal2(AbilityBuilder builder) { builder.Create(Feat.LifeSteal2, PerkType.LifeSteal) .Name("Life Steal II") .HasRecastDelay(RecastGroup.LifeSteal, 120f) .RequirementStamina(30) .UsesActivationType(AbilityActivationType.Weapon) .HasImpactAction((activator, target, level) => { var percentRecovery = 0.50f; SetLocalFloat(target, LifeStealVariableName, percentRecovery); SetLocalObject(target, LifeStealActivatorVariableName, activator); }); }
private static void Warp1(AbilityBuilder builder) { builder.Create(Feat.Warp1, PerkType.Warp) .Name("Warp I") .HasRecastDelay(RecastGroup.Warp, 30f) .HasActivationDelay(12.0f) .RequirementMP(20) .UsesActivationType(AbilityActivationType.Casted) .DisplaysVisualEffectWhenActivating() .HasImpactAction((activator, target, level) => { SendToHomePoint(target); }); }
private static void Stone3(AbilityBuilder builder) { builder.Create(Feat.Stone3, PerkType.Stone) .Name("Stone III") .HasRecastDelay(RecastGroup.Stone, 4f) .HasActivationDelay(2.0f) .RequirementMP(7) .UsesActivationType(AbilityActivationType.Casted) .DisplaysVisualEffectWhenActivating() .HasImpactAction((activator, target, level) => { ApplyStoneEffects(activator, target, Random.D10(2), 14); }); }
private static void Invincible(AbilityBuilder builder) { builder.Create(Feat.Invincible, PerkType.Invincible) .Name("Invincible") .HasRecastDelay(RecastGroup.OneHourAbility, 3600f) .UsesActivationType(AbilityActivationType.Casted) .RequirementStamina(50) .HasImpactAction((activator, target, level) => { StatusEffect.Apply(activator, target, StatusEffectType.Invincible, 30.0f); CombatPoint.AddCombatPointToAllTagged(activator, SkillType.Chivalry, 5); Enmity.ModifyEnmityOnAll(activator, 500); ApplyEffectToObject(DurationType.Instant, EffectVisualEffect(VisualEffect.Vfx_Fnf_Sound_Burst), target); }); }
private static void Thunder3(AbilityBuilder builder) { builder.Create(Feat.Thunder3, PerkType.Thunder) .Name("Thunder III") .HasRecastDelay(RecastGroup.Thunder, 4f) .HasActivationDelay(4.0f) .RequirementMP(8) .UsesActivationType(AbilityActivationType.Casted) .DisplaysVisualEffectWhenActivating() .HasImpactAction((activator, target, level) => { ApplyThunderEffects(activator, target, Random.D12(2), 15, 6f); ApplyAOEThunderEffects(activator, target, Random.D12(2), 15, 6f); }); }
private static void Blizzard3(AbilityBuilder builder) { builder.Create(Feat.Blizzard3, PerkType.Blizzard) .Name("Blizzard III") .HasRecastDelay(RecastGroup.Blizzard, 2f) .HasActivationDelay(2.0f) .RequirementMP(6) .UsesActivationType(AbilityActivationType.Casted) .DisplaysVisualEffectWhenActivating() .HasImpactAction((activator, target, level) => { ApplyBlizzardEffects(activator, target, Random.D8(2), 10, 30f); ApplyAOEBlizzardEffects(activator, target, Random.D8(2), 10, 30f); }); }
private static void Fire3(AbilityBuilder builder) { builder.Create(Feat.Fire3, PerkType.Fire) .Name("Fire III") .HasRecastDelay(RecastGroup.Fire, 3f) .HasActivationDelay(3.0f) .RequirementMP(7) .UsesActivationType(AbilityActivationType.Casted) .DisplaysVisualEffectWhenActivating() .HasImpactAction((activator, target, level) => { ApplyFireEffects(activator, target, Random.D12(2), 15, 30f); ApplyAOEFireEffects(activator, target, Random.D12(2), 15, 30f); }); }
private static void Refresh(AbilityBuilder builder) { builder.Create(Feat.Refresh, PerkType.Refresh) .Name("Refresh") .HasRecastDelay(RecastGroup.Refresh, 18f) .RequirementMP(12) .UsesActivationType(AbilityActivationType.Casted) .HasImpactAction((activator, target, level) => { StatusEffect.Apply(activator, target, StatusEffectType.Refresh, 180f); ApplyEffectToObject(DurationType.Instant, EffectVisualEffect(VisualEffect.Vfx_Imp_Head_Mind), target); Enmity.ModifyEnmityOnAll(activator, 6); CombatPoint.AddCombatPointToAllTagged(activator, SkillType.RedMagic, 3); }); }
private static void Blind1(AbilityBuilder builder) { builder.Create(Feat.Blind1, PerkType.Blind) .Name("Blind I") .HasRecastDelay(RecastGroup.Blind, 12f) .RequirementMP(6) .UsesActivationType(AbilityActivationType.Casted) .HasActivationDelay(2f) .HasImpactAction((activator, target, level) => { StatusEffect.Apply(activator, target, StatusEffectType.Blind1, 15f); Enmity.ModifyEnmity(activator, target, 4); CombatPoint.AddCombatPointToAllTagged(activator, SkillType.RedMagic, 3); }); }
private static void WaspSting3(AbilityBuilder builder) { builder.Create(Feat.WaspSting3, PerkType.WaspSting) .Name("Wasp Sting III") .HasRecastDelay(RecastGroup.WaspSting, 60f) .RequirementStamina(12) .UsesActivationType(AbilityActivationType.Weapon) .HasImpactAction((activator, target, level) => { ApplyEffectToObject(DurationType.Instant, EffectVisualEffect(VisualEffect.Vfx_Imp_Poison_S), target); StatusEffect.Apply(activator, target, StatusEffectType.Poison3, 24f); CombatPoint.AddCombatPoint(activator, target, SkillType.Thievery, 3); Enmity.ModifyEnmity(activator, target, 20); }); }
private static void Steal4(AbilityBuilder builder) { builder.Create(Feat.Steal4, PerkType.Steal) .Name("Steal IV") .HasRecastDelay(RecastGroup.Steal, 60f) .RequirementStamina(40) .UsesActivationType(AbilityActivationType.Casted) .UsesAnimation(Animation.LoopingGetMid) .HasActivationDelay(3.0f) .HasCustomValidation((activator, target, level) => CheckForStealableItems(target)) .HasImpactAction((activator, target, level) => { const int BaseChance = 50; AttemptSteal(activator, target, BaseChance); }); }
private static void Ironclad1(AbilityBuilder builder) { builder.Create(Feat.Ironclad1, PerkType.Ironclad) .Name("Ironclad I") .HasRecastDelay(RecastGroup.Ironclad, 300f) .RequirementStamina(10) .UsesActivationType(AbilityActivationType.Casted) .HasImpactAction((activator, target, level) => { StatusEffect.Apply(activator, target, StatusEffectType.Ironclad1, 60f); ApplyEffectToObject(DurationType.Instant, EffectVisualEffect(VisualEffect.Vfx_Imp_Death_Ward), target); Enmity.ModifyEnmityOnAll(activator, 8); CombatPoint.AddCombatPointToAllTagged(activator, SkillType.Chivalry, 3); }); }
private static void SubtleBlow2(AbilityBuilder builder) { builder.Create(Feat.SubtleBlow2, PerkType.SubtleBlow) .Name("Subtle Blow II") .HasRecastDelay(RecastGroup.SubtleBlow, 300f) .RequirementStamina(7) .UsesActivationType(AbilityActivationType.Casted) .HasImpactAction((activator, target, level) => { StatusEffect.Apply(activator, target, StatusEffectType.SubtleBlow2, 30f); ApplyEffectToObject(DurationType.Instant, EffectVisualEffect(VisualEffect.Vfx_Imp_Ac_Bonus), target); CombatPoint.AddCombatPointToAllTagged(activator, SkillType.Chi, 3); Enmity.ModifyEnmityOnAll(activator, 8); }); }
private static void PerfectDodge(AbilityBuilder builder) { builder.Create(Feat.PerfectDodge, PerkType.PerfectDodge) .Name("Perfect Dodge") .HasRecastDelay(RecastGroup.OneHourAbility, 3600f) .UsesActivationType(AbilityActivationType.Casted) .RequirementStamina(50) .HasImpactAction((activator, target, level) => { ApplyEffectToObject(DurationType.Temporary, EffectACIncrease(20), target, 30f); ApplyEffectToObject(DurationType.Temporary, EffectVisualEffect(VisualEffect.Vfx_Dur_Pixiedust), target, 30f); CombatPoint.AddCombatPointToAllTagged(activator, SkillType.Thievery, 5); Enmity.ModifyEnmityOnAll(activator, 150); }); }
private static void Manafont(AbilityBuilder builder) { builder.Create(Feat.Manafont, PerkType.Manafont) .Name("Manafont") .HasRecastDelay(RecastGroup.OneHourAbility, 3600f) .UsesActivationType(AbilityActivationType.Casted) .RequirementMP(50) .HasImpactAction((activator, target, level) => { StatusEffect.Apply(activator, target, StatusEffectType.Manafont, 30f); ApplyEffectToObject(DurationType.Instant, EffectVisualEffect(VisualEffect.Vfx_Fnf_Sound_Burst), target); CombatPoint.AddCombatPointToAllTagged(activator, SkillType.RedMagic, 5); Enmity.ModifyEnmityOnAll(activator, 100); }); }
private static void ElementalSeal(AbilityBuilder builder) { builder.Create(Feat.ElementalSeal, PerkType.ElementalSeal) .Name("Elemental Seal") .DisplaysVisualEffectWhenActivating() .HasRecastDelay(RecastGroup.OneHourAbility, 3600f) .UsesActivationType(AbilityActivationType.Casted) .RequirementMP(50) .HasImpactAction((activator, target, level) => { StatusEffect.Apply(activator, target, StatusEffectType.ElementalSeal, 30f); ApplyEffectToObject(DurationType.Instant, EffectVisualEffect(VisualEffect.Vfx_Fnf_Howl_Mind), target); CombatPoint.AddCombatPointToAllTagged(activator, SkillType.BlackMagic, 5); Enmity.ModifyEnmityOnAll(activator, 300); }); }
private static void PiercingStab3(AbilityBuilder builder) { builder.Create(Feat.PiercingStab3, PerkType.PiercingStab) .Name("Piercing Stab III") .HasRecastDelay(RecastGroup.PiercingStab, 60f) .RequirementStamina(15) .UsesActivationType(AbilityActivationType.Weapon) .HasImpactAction((activator, target, level) => { var duration = CalculateDuration(activator); StatusEffect.Apply(activator, target, StatusEffectType.Bleed3, duration); ApplyEffectToObject(DurationType.Instant, EffectVisualEffect(VisualEffect.Vfx_Com_Chunk_Red_Small), target); CombatPoint.AddCombatPoint(activator, target, SkillType.RedMagic, 2); Enmity.ModifyEnmity(activator, target, 14); }); }
private static void Shadowstitch2(AbilityBuilder builder) { builder.Create(Feat.Shadowstitch2, PerkType.Shadowstitch) .Name("Shadowstitch II") .HasRecastDelay(RecastGroup.Shadowstitch, 60f) .RequirementStamina(18) .UsesActivationType(AbilityActivationType.Weapon) .HasImpactAction((activator, target, level) => { var duration = 24f; ApplyEffectToObject(DurationType.Temporary, EffectVisualEffect(VisualEffect.Vfx_Dur_Aura_Magenta), target, duration); ApplyEffectToObject(DurationType.Temporary, EffectCutsceneImmobilize(), target, duration); CombatPoint.AddCombatPoint(activator, target, SkillType.Thievery, 3); Enmity.ModifyEnmity(activator, target, 18); }); }
private static void Warp2(AbilityBuilder builder) { builder.Create(Feat.Warp2, PerkType.Warp) .Name("Warp II") .HasRecastDelay(RecastGroup.Warp, 30f) .HasActivationDelay(12.0f) .RequirementMP(40) .UsesActivationType(AbilityActivationType.Casted) .DisplaysVisualEffectWhenActivating() .HasImpactAction((activator, target, level) => { foreach (var member in Party.GetAllPartyMembersWithinRange(activator, 10.0f)) { SendToHomePoint(member); } }); }
private static void DeliberateStab(AbilityBuilder builder) { builder.Create(Feat.DeliberateStab, PerkType.DeliberateStab) .Name("Deliberate Stab") .HasRecastDelay(RecastGroup.DeliberateStab, 300f) .RequirementStamina(20) .UsesActivationType(AbilityActivationType.Casted) .HasActivationDelay(2f) .HasImpactAction((activator, target, level) => { StatusEffect.Apply(activator, target, StatusEffectType.DeliberateStab, 30f); ApplyEffectToObject(DurationType.Instant, EffectVisualEffect(VisualEffect.Vfx_Imp_Divine_Strike_Holy), activator); Enmity.ModifyEnmityOnAll(activator, 3); CombatPoint.AddCombatPointToAllTagged(activator, SkillType.RedMagic, 3); }); }