Skip to content

Commit

Permalink
add support to Petal Storm on obscurement rules and change Insect Pla…
Browse files Browse the repository at this point in the history
…gue to lightly obscured
  • Loading branch information
ThyWoof committed Jan 18, 2024
1 parent 5d0f69a commit 3328b17
Show file tree
Hide file tree
Showing 13 changed files with 57 additions and 7 deletions.
3 changes: 2 additions & 1 deletion SolastaUnfinishedBusiness/Models/SpellsContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ internal static class SpellsContext
internal static readonly SpellDefinition EnsnaringStrike = BuildEnsnaringStrike();
internal static readonly SpellDefinition FarStep = BuildFarStep();
internal static readonly SpellDefinition MirrorImage = BuildMirrorImage();
internal static readonly SpellDefinition PetalStorm = BuildPetalStorm();
internal static readonly SpellDefinition PsychicWhip = BuildPsychicWhip();
internal static readonly SpellDefinition PulseWave = BuildPulseWave();
internal static readonly SpellDefinition SearingSmite = BuildSearingSmite();
Expand Down Expand Up @@ -255,7 +256,7 @@ internal static void LateLoad()
RegisterSpell(BuildCloudOfDaggers(), 0, SpellListBard, SpellListSorcerer, SpellListWarlock, SpellListWizard);
RegisterSpell(ColorBurst, 0, SpellListSorcerer, SpellListWizard, spellListInventorClass);
RegisterSpell(BuildNoxiousSpray(), 0, SpellListDruid, SpellListSorcerer, SpellListWarlock, SpellListWizard);
RegisterSpell(BuildPetalStorm(), 0, SpellListDruid);
RegisterSpell(PetalStorm, 0, SpellListDruid);
RegisterSpell(BuildProtectThreshold(), 0, SpellListCleric, SpellListDruid, SpellListPaladin);
RegisterSpell(PsychicWhip, 0, SpellListSorcerer, SpellListWizard);
RegisterSpell(MirrorImage, 0, SpellListBard, SpellListSorcerer, SpellListWarlock, SpellListWizard);
Expand Down
39 changes: 34 additions & 5 deletions SolastaUnfinishedBusiness/Models/SrdAndHouseRulesContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,22 @@ internal static class SrdAndHouseRulesContext
.SetForbiddenActions(Id.AttackOpportunity)
.AddToDB();

private static readonly EffectForm FormBlinded = EffectFormBuilder
.Create()
.SetConditionForm(ConditionDefinitions.ConditionBlinded, ConditionForm.ConditionOperation.Add)
.Build();
private static readonly ConditionDefinition ConditionLightlyObscured = ConditionDefinitionBuilder
.Create(ConditionHeavilyObscured, "ConditionLightlyObscured")
.SetOrUpdateGuiPresentation(Category.Condition)
.SetFeatures(
FeatureDefinitionAbilityCheckAffinityBuilder
.Create("AbilityCheckAffinityLightlyObscured")
.SetOrUpdateGuiPresentation("ConditionLightlyObscured", Category.Condition)
.BuildAndSetAffinityGroups(CharacterAbilityCheckAffinity.Disadvantage,
abilityProficiencyPairs: (AttributeDefinitions.Wisdom, SkillDefinitions.Perception))
.AddToDB())
.AddToDB();

private static readonly EffectForm FormBlinded =
EffectFormBuilder.ConditionForm(ConditionDefinitions.ConditionBlinded);

private static readonly EffectForm FormLightlyObscured = EffectFormBuilder.ConditionForm(ConditionLightlyObscured);

private static SpellDefinition ConjureElementalInvisibleStalker { get; set; }

Expand Down Expand Up @@ -438,10 +450,14 @@ internal static void SwitchOfficialObscurementRules()

// >> ConditionHeavilyObscured
// FogCloud
// PetalStorm

FogCloud.EffectDescription.EffectForms[1].ConditionForm.ConditionDefinition =
ConditionDefinitions.ConditionBlinded;

SpellsContext.PetalStorm.EffectDescription.EffectForms[1].ConditionForm.ConditionDefinition =
ConditionDefinitions.ConditionBlinded;

// >> ConditionInStinkingCloud
// StinkingCloud

Expand All @@ -459,6 +475,9 @@ internal static void SwitchOfficialObscurementRules()
CloudKill.EffectDescription.EffectForms.Add(FormBlinded);
IncendiaryCloud.EffectDescription.EffectForms.Add(FormBlinded);

// Make Insect Plague lightly obscured
InsectPlague.EffectDescription.EffectForms.Add(FormLightlyObscured);

// vanilla has this set as disadvantage so we flip it with nullified requirements
CombatAffinityHeavilyObscured.attackOnMeAdvantage = AdvantageType.Advantage;
(CombatAffinityHeavilyObscured.nullifiedBySenses, CombatAffinityHeavilyObscured.nullifiedBySelfSenses) =
Expand All @@ -468,9 +487,10 @@ internal static void SwitchOfficialObscurementRules()
CloudKill.EffectDescription.EffectForms[2].TopologyForm.changeType = TopologyForm.Type.None;
FogCloud.EffectDescription.EffectForms[1].TopologyForm.changeType = TopologyForm.Type.None;
IncendiaryCloud.EffectDescription.EffectForms[2].TopologyForm.changeType = TopologyForm.Type.None;
InsectPlague.effectDescription.EffectForms[1].TopologyForm.changeType = TopologyForm.Type.SightBlocker;
InsectPlague.effectDescription.EffectForms[1].TopologyForm.changeType = TopologyForm.Type.None;
SleetStorm.EffectDescription.EffectForms[5].TopologyForm.changeType = TopologyForm.Type.None;
StinkingCloud.EffectDescription.EffectForms[1].TopologyForm.changeType = TopologyForm.Type.None;
SpellsContext.PetalStorm.EffectDescription.EffectForms[2].TopologyForm.changeType = TopologyForm.Type.None;
}
else
{
Expand Down Expand Up @@ -499,10 +519,14 @@ internal static void SwitchOfficialObscurementRules()

// >> ConditionHeavilyObscured
// FogCloud
// PetalStorm

FogCloud.EffectDescription.EffectForms[1].ConditionForm.ConditionDefinition =
ConditionHeavilyObscured;

SpellsContext.PetalStorm.EffectDescription.EffectForms[1].ConditionForm.ConditionDefinition =
ConditionHeavilyObscured;

// >> ConditionInStinkingCloud
// StinkingCloud

Expand All @@ -520,6 +544,9 @@ internal static void SwitchOfficialObscurementRules()
CloudKill.EffectDescription.EffectForms.Remove(FormBlinded);
IncendiaryCloud.EffectDescription.EffectForms.Remove(FormBlinded);

// Remove lightly obscured from Insect Plague
InsectPlague.EffectDescription.EffectForms.Remove(FormLightlyObscured);

// vanilla has this set as disadvantage so we flip it with nullified requirements
CombatAffinityHeavilyObscured.attackOnMeAdvantage = AdvantageType.Disadvantage;
(CombatAffinityHeavilyObscured.nullifiedBySelfSenses, CombatAffinityHeavilyObscured.nullifiedBySenses) =
Expand All @@ -532,6 +559,8 @@ internal static void SwitchOfficialObscurementRules()
InsectPlague.effectDescription.EffectForms[1].TopologyForm.changeType = TopologyForm.Type.SightImpaired;
SleetStorm.EffectDescription.EffectForms[5].TopologyForm.changeType = TopologyForm.Type.SightImpaired;
StinkingCloud.EffectDescription.EffectForms[1].TopologyForm.changeType = TopologyForm.Type.SightImpaired;
SpellsContext.PetalStorm.EffectDescription.EffectForms[2].TopologyForm.changeType =
TopologyForm.Type.SightImpaired;
}
}

Expand Down
2 changes: 1 addition & 1 deletion SolastaUnfinishedBusiness/Spells/SpellBuildersLevel02.cs
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,12 @@ internal static SpellDefinition BuildPetalStorm()
false,
EffectDifficultyClassComputation.SpellCastingFeature)
.SetEffectForms(
EffectFormBuilder.ConditionForm(ConditionHeavilyObscured),
EffectFormBuilder
.Create()
.HasSavingThrow(EffectSavingThrowType.Negates)
.SetDamageForm(DamageTypeSlashing, 3, DieType.D4)
.Build(),
EffectFormBuilder.ConditionForm(ConditionHeavilyObscured),
EffectFormBuilder.TopologyForm(TopologyForm.Type.SightImpaired, true),
EffectFormBuilder
.Create()
Expand Down
2 changes: 2 additions & 0 deletions SolastaUnfinishedBusiness/Translations/de/Others-de.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ Action/&TacticianGambitTitle=Gambits
Action/&WithdrawDescription=Wenn Sie sich in Nahkampfreichweite einer feindlichen Kreatur befinden, können Sie Ihre Bonusaktion nutzen, um sich bis zu 3 Felder zu bewegen, ohne Gelegenheitsangriffe zu provozieren.
Action/&WithdrawTitle=Zurückziehen
BlueprintCategory/&FlatRoomsTitle=Flache Zimmer
Condition/&ConditionLightlyObscuredDescription=Die Sicht ist leicht eingeschränkt. Nachteil bei Weisheits-(Wahrnehmungs-)Rettungswürfen.
Condition/&ConditionLightlyObscuredTitle=Leicht verdeckt
Condition/&ConditionRogueCunningStrikeDisarmedTitle=Entwaffnet
Condition/&ConditionRogueCunningStrikeWithdrawTitle=Zurückgezogen
Condition/&ConditionRogueDeviousStrikeDazedDescription=Sie können keine Reaktionen oder Bonusaktionen verwenden und können sich in Ihrem Zug bewegen oder andere Aktionen ausführen, nicht beides.
Expand Down
2 changes: 2 additions & 0 deletions SolastaUnfinishedBusiness/Translations/en/Others-en.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ Rules/&ActivationTypeOnRageStartAutomaticTitle=Auto Rage Start
Rules/&ActivationTypeOnReduceCreatureToZeroHPAutoTitle=Auto Creature Reduced to Zero HP
Rules/&ActivationTypeOnSneakAttackHitAutoTitle=Auto Sneak Attack
Rules/&ConditionBlindedExtendedDescription=Vision is blinded. Attack rolls against the creature have advantage, and the creature's attack rolls have disadvantage.
Condition/&ConditionLightlyObscuredDescription=Vision is lightly obscured. Disadvantage on wisdom (perception) saving throws.
Condition/&ConditionLightlyObscuredTitle=Lightly Obscured
Rules/&CounterFormDismissCreatureFormat=Dismisses a target conjured creature
Rules/&SituationalContext1000Format=Has Blade Mastery weapon types in hands:
Rules/&SituationalContext1001Format=Has Greatsword in hands:
Expand Down
2 changes: 2 additions & 0 deletions SolastaUnfinishedBusiness/Translations/es/Others-es.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ Action/&TacticianGambitTitle=Gambitos
Action/&WithdrawDescription=Cuando estás dentro del rango cuerpo a cuerpo de una criatura enemiga, puedes usar tu acción adicional para moverte hasta 3 celdas sin provocar ataques de oportunidad.
Action/&WithdrawTitle=Retirar
BlueprintCategory/&FlatRoomsTitle=Habitaciones planas
Condition/&ConditionLightlyObscuredDescription=La visión está ligeramente oscurecida. Desventaja en las tiradas de salvación de sabiduría (percepción).
Condition/&ConditionLightlyObscuredTitle=Ligeramente oscurecido
Condition/&ConditionRogueCunningStrikeDisarmedTitle=Desarmado
Condition/&ConditionRogueCunningStrikeWithdrawTitle=Retirado
Condition/&ConditionRogueDeviousStrikeDazedDescription=No puedes usar reacciones o acciones de bonificación, y puedes moverte o realizar otras acciones en tu turno, no ambas.
Expand Down
2 changes: 2 additions & 0 deletions SolastaUnfinishedBusiness/Translations/fr/Others-fr.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ Action/&TacticianGambitTitle=Gambits
Action/&WithdrawDescription=Lorsque vous êtes à portée de mêlée d'une créature ennemie, vous pouvez utiliser votre action bonus pour vous déplacer jusqu'à 3 cases sans provoquer d'attaques d'opportunité.
Action/&WithdrawTitle=Se Retirer
BlueprintCategory/&FlatRoomsTitle=Pièces d'appartement
Condition/&ConditionLightlyObscuredDescription=La vision est légèrement obscurcie. Inconvénient sur les jets de sauvegarde de sagesse (perception).
Condition/&ConditionLightlyObscuredTitle=Légèrement obscurci
Condition/&ConditionRogueCunningStrikeDisarmedTitle=Désarmé
Condition/&ConditionRogueCunningStrikeWithdrawTitle=Retiré
Condition/&ConditionRogueDeviousStrikeDazedDescription=Vous ne pouvez pas utiliser de réactions ou d'actions bonus, vous pouvez vous déplacer ou effectuer une action à votre tour, mais pas les deux.
Expand Down
2 changes: 2 additions & 0 deletions SolastaUnfinishedBusiness/Translations/it/Others-it.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ Action/&TacticianGambitTitle=Gambetti
Action/&WithdrawDescription=Quando ti trovi nel raggio di mischia di una creatura nemica, puoi usare la tua azione bonus per muoverti fino a 3 caselle senza provocare attacchi di opportunità.
Action/&WithdrawTitle=Ritirare
BlueprintCategory/&FlatRoomsTitle=Camere piatte
Condition/&ConditionLightlyObscuredDescription=La visione è leggermente oscurata. Svantaggio sui tiri salvezza su saggezza (percezione).
Condition/&ConditionLightlyObscuredTitle=Leggermente oscurato
Condition/&ConditionRogueCunningStrikeDisarmedTitle=Disarmato
Condition/&ConditionRogueCunningStrikeWithdrawTitle=Ritirato
Condition/&ConditionRogueDeviousStrikeDazedDescription=Non puoi usare reazioni o azioni bonus e puoi muoverti o compiere altre azioni nel tuo turno, non entrambe.
Expand Down
2 changes: 2 additions & 0 deletions SolastaUnfinishedBusiness/Translations/ja/Others-ja.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ Action/&TacticianGambitTitle=ギャンビット
Action/&WithdrawDescription=敵クリーチャーの近接範囲内にいる場合、ボーナス アクションを使用して、機会攻撃を引き起こすことなく最大 3 セルまで移動できます。
Action/&WithdrawTitle=撤退
BlueprintCategory/&FlatRoomsTitle=フラットルーム
Condition/&ConditionLightlyObscuredDescription=視界が軽く遮られます。知恵(知覚)セービングスローのデメリット。
Condition/&ConditionLightlyObscuredTitle=軽くぼやけています
Condition/&ConditionRogueCunningStrikeDisarmedTitle=武装解除
Condition/&ConditionRogueCunningStrikeWithdrawTitle=引きこもった
Condition/&ConditionRogueDeviousStrikeDazedDescription=リアクションやボーナス アクションを使用することはできません。また、自分の番に移動または他のアクションを実行することはできますが、両方を実行することはできません。
Expand Down
2 changes: 2 additions & 0 deletions SolastaUnfinishedBusiness/Translations/ko/Others-ko.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ Action/&TacticianGambitTitle=승부수
Action/&WithdrawDescription=적 크리처의 근접 공격 범위 내에 있을 때, 추가 행동을 사용하여 기회 공격을 발동시키지 않고 최대 3칸까지 이동할 수 있습니다.
Action/&WithdrawTitle=철수
BlueprintCategory/&FlatRoomsTitle=침실
Condition/&ConditionLightlyObscuredDescription=시야가 살짝 흐려집니다. 지혜(지각) 내성 굴림에 불리함.
Condition/&ConditionLightlyObscuredTitle=약간 가려짐
Condition/&ConditionRogueCunningStrikeDisarmedTitle=무장해제됨
Condition/&ConditionRogueCunningStrikeWithdrawTitle=철수함
Condition/&ConditionRogueDeviousStrikeDazedDescription=반응 행동이나 추가 행동은 사용할 수 없으며, 자신의 차례에 이동하거나 다른 행동을 할 수 있지만 둘 다는 사용할 수 없습니다.
Expand Down
2 changes: 2 additions & 0 deletions SolastaUnfinishedBusiness/Translations/pt-BR/Others-pt-BR.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ Action/&TacticianGambitTitle=Gambitos
Action/&WithdrawDescription=Quando você estiver dentro do alcance corpo a corpo de uma criatura inimiga, você pode usar sua ação bônus para mover até 3 células sem provocar ataques de oportunidade.
Action/&WithdrawTitle=Retirar
BlueprintCategory/&FlatRoomsTitle=Quartos Planos
Condition/&ConditionLightlyObscuredDescription=A visão está levemente obscurecida. Desvantagem nos testes de resistência de sabedoria (percepção).
Condition/&ConditionLightlyObscuredTitle=Levemente obscurecido
Condition/&ConditionRogueCunningStrikeDisarmedTitle=Desarmado
Condition/&ConditionRogueCunningStrikeWithdrawTitle=Retirado
Condition/&ConditionRogueDeviousStrikeDazedDescription=Você não pode usar reações ou ações bônus e pode se mover ou realizar outras ações no seu turno, não ambas.
Expand Down
2 changes: 2 additions & 0 deletions SolastaUnfinishedBusiness/Translations/ru/Others-ru.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ Action/&TacticianGambitTitle=Уловки
Action/&WithdrawDescription=Когда вы находитесь в ближнем бою с враждебным существом, вы можете бонусным действием переместиться на 3 клетки, не провоцируя атаки.
Action/&WithdrawTitle=Отступить
BlueprintCategory/&FlatRoomsTitle=Простые комнаты
Condition/&ConditionLightlyObscuredDescription=Зрение слегка затуманено. Недостаток на спасбросках мудрости (восприятия).
Condition/&ConditionLightlyObscuredTitle=Слегка затемненный
Condition/&ConditionRogueCunningStrikeDisarmedTitle=Разоружён
Condition/&ConditionRogueCunningStrikeWithdrawTitle=Отступающий
Condition/&ConditionRogueDeviousStrikeDazedDescription=Вы не можете совершать реакции или бонусные действия, а также должны выбрать что-то одно - перемещаться или совершать другие действия в свой ход.
Expand Down
2 changes: 2 additions & 0 deletions SolastaUnfinishedBusiness/Translations/zh-CN/Others-zh-CN.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ Action/&TacticianGambitTitle=策略
Action/&WithdrawDescription=当你处于敌方生物的近战范围内时,你可以使用奖励动作移动最多 3 个方格,而不会引发借机攻击。
Action/&WithdrawTitle=提取
BlueprintCategory/&FlatRoomsTitle=平坦房间
Condition/&ConditionLightlyObscuredDescription=视线被轻微遮挡。智慧(感知)豁免检定的劣势。
Condition/&ConditionLightlyObscuredTitle=轻微遮挡
Condition/&ConditionRogueCunningStrikeDisarmedTitle=解除武装
Condition/&ConditionRogueCunningStrikeWithdrawTitle=取消
Condition/&ConditionRogueDeviousStrikeDazedDescription=你不能使用反应或奖励动作,并且可以在你的回合中移动或采取其他动作,但不能同时执行两者。
Expand Down

0 comments on commit 3328b17

Please sign in to comment.