Skip to content

Commit

Permalink
Changes to Ankh Guards, sigil fixes, Start Conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
Arackulele committed Apr 21, 2023
1 parent d11b4c8 commit 78ad6c2
Show file tree
Hide file tree
Showing 12 changed files with 571 additions and 10 deletions.
15 changes: 12 additions & 3 deletions Abilities/Normal/GainAttackNoBones.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,22 @@ public class GainAttackNoBones : AbilityBehaviour
{
public static Ability ability;

public const string ModSingletonId = "GrimoraMod_Malnourishment";

public override Ability Ability => ability;

private CardModificationInfo _modInfo;

private void Start()
{
_modInfo = new CardModificationInfo
{
singletonId = ModSingletonId
};
Card.AddTemporaryMod(_modInfo);
}


public override bool RespondsToUpkeep(bool playerUpkeep) => true;
public override bool RespondsToUpkeep(bool playerUpkeep) => true;

public override IEnumerator OnUpkeep(bool playerUpkeep)
{
Expand All @@ -37,7 +46,7 @@ public partial class GrimoraPlugin
public void Add_Ability_GainAttackNoBones()
{
const string rulebookDescription =
"If you have no Bones, [creature] deals 2 more damage.";
"If you have no Bones, at the start of your turn [creature] deals 2 more damage.";

AbilityBuilder<GainAttackNoBones>.Builder
.SetRulebookDescription(rulebookDescription)
Expand Down
18 changes: 18 additions & 0 deletions Cards/Terrain/Obelisk.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using DiskCardGame;

namespace GrimoraMod;

public partial class GrimoraPlugin
{
public const string NameObelisk = $"{GUID}_Obelisk";

private void Add_Card_Obelisk()
{
CardBuilder.Builder
.SetAbilities(Ability.MadeOfStone )
.SetBaseAttackAndHealth(0, 1)
.SetNames(NameObelisk, "Obelisk")
.SetTraits(Trait.Structure, Trait.Terrain)
.Build();
}
}
18 changes: 18 additions & 0 deletions Cards/Terrain/VoodooDoll.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using DiskCardGame;

namespace GrimoraMod;

public partial class GrimoraPlugin
{
public const string NameVoodooDoll = $"{GUID}_Voodoo_Doll";

private void Add_Card_Voodoo_Doll()
{
CardBuilder.Builder
.SetBaseAttackAndHealth(0, 2)
.SetNames(NameVoodooDoll, "Voodoo Doll")
.SetTraits(Trait.Structure, Trait.Terrain)
.SetAbilities(Haunter.ability, InvertedStrike.ability)
.Build();
}
}
2 changes: 1 addition & 1 deletion Core/Consumables/Quill.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public override IEnumerator OnValidTargetSelected(CardSlot target, GameObject fi
yield return new WaitForSeconds(0.35f);
}

public static ConsumableItemData NewMallet(GameObject Model)
public static ConsumableItemData NewQuill(GameObject Model)
{
Debug.Log("Added Quill");

Expand Down
2 changes: 1 addition & 1 deletion Core/Models/GrimoraChessboard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public void SetupBoard(bool placePieces)
PlacePieces<ChessboardChestPiece>();
PlacePieces<ChessboardElectricChairPiece>();
PlacePieces<ChessboardEnemyPiece>(GrimoraModBattleSequencer.FullSequencer.Id);
PlacePieces<ChessboardGoatEyePiece>();
PlacePieces<ChessboardGoatEyePiece>(AnkhGuardCombatSequencer.FullSequencer.Id);
PlacePieces<ChessboardGainConsumablePiece>();
}
}
Expand Down
1 change: 0 additions & 1 deletion Core/Models/Pieces/ChessboardGoatEyePiece.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ public override void OnPlayerInteracted()
Random = UnityEngine.Random.RandomRangeInt(0, 4);
StartCoroutine(AnkhGuardPreStartDialogue());


}


Expand Down
107 changes: 106 additions & 1 deletion Core/Opponents/GrimoraModBattleSequencer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,119 @@ public class GrimoraModBattleSequencer : SpecialBattleSequencer

private readonly List<CardInfo> _cardsThatHaveDiedThisMatch = new List<CardInfo>();

List<EncounterData.StartCondition> GlobalStartCon = new List<EncounterData.StartCondition>()
{

new ()
{
cardsInOpponentSlots = new[] { null, NameObelisk.GetCardInfo(), null, null },
cardsInPlayerSlots = new[] { null, NameDeadTree.GetCardInfo(), null, null },
},
new ()
{
cardsInOpponentSlots = new[] { null, NameObol.GetCardInfo(), null, null },
cardsInPlayerSlots = new[] { null, null, null, NameDeadTree.GetCardInfo() },
},

new ()
{
cardsInOpponentSlots = new[] { NameDeadTree.GetCardInfo(), NameDisturbedGrave.GetCardInfo(), null, null },
},

new ()
{
cardsInPlayerSlots = new[] { null, NameDisturbedGrave.GetCardInfo(), null, NameDeadTree.GetCardInfo() },
},

new ()
{
cardsInPlayerSlots = new[] { null, NameDisturbedGrave.GetCardInfo(), null, NameObelisk.GetCardInfo() },
},

new ()
{
cardsInOpponentSlots = new[] { null, null , NameDeadTree.GetCardInfo(), null },
cardsInPlayerSlots = new[] { NameVoodooDoll.GetCardInfo() , null, null, null },
},

new ()
{
cardsInOpponentSlots = new[] { null, NameVoodooDoll.GetCardInfo(), NameDeadTree.GetCardInfo(), null },
cardsInPlayerSlots = new[] { null, , null, null, NameObelisk.GetCardInfo() },
},

};

List<EncounterData.StartCondition> KayceeStarts = new List<EncounterData.StartCondition>()
{
new ()
{
cardsInOpponentSlots = new[] { NameDraugr.GetCardInfo(), null, null, null },
cardsInPlayerSlots = new[] { null , null, null, NameDraugr.GetCardInfo() },
},
new ()
{
cardsInOpponentSlots = new[] { NameGlacier.GetCardInfo(), null, null, null },
},
new ()
{
cardsInPlayerSlots = new[] { null, null, null, NameGlacier.GetCardInfo() },
},
new ()
{
cardsInPlayerSlots = new[] { null, NameGlacier.GetCardInfo(), null, null },
},
new ()
{
cardsInPlayerSlots = new[] { null, NameGlacier.GetCardInfo(), null, null },
},
new ()
{
cardsInPlayerSlots = new[] { null, NameObelisk.GetCardInfo(), null, NameDraugr.GetCardInfo() },
},
new ()
{
cardsInOpponentSlots = new[] { null, null, NameVoodooDoll.GetCardInfo(), null },
cardsInPlayerSlots = new[] { null , null, null, NameDraugr.GetCardInfo() },
},

};


public override EncounterData BuildCustomEncounter(CardBattleNodeData nodeData)
{

List<EncounterData.StartCondition> CompoundStartCon = new List<EncounterData.StartCondition>();

switch(GrimoraRunState.CurrentRun.regionTier)
{
case 1:
CompoundStartCon.AddRange(KayceeStarts);
break;
case 2:
//CompoundStartCon.AddRange(KayceeStarts);
break;
case 3:
//CompoundStartCon.AddRange(KayceeStarts);
break;
case 4:
//CompoundStartCon.AddRange(KayceeStarts);
break;



}

EncounterData data = new EncounterData
{
opponentType = Opponent.Type.Default,

startConditions = null,

opponentType = Opponent.Type.Default,
opponentTurnPlan = nodeData.blueprint
.turns.Select(bpList1 => bpList1.Select(bpList2 => bpList2.card).ToList())
.ToList()

};
data.opponentType = this is GrimoraModBossBattleSequencer boss ? boss.BossType : GrimoraModFinaleOpponent.FullOpponent.Id;

Expand Down
2 changes: 1 addition & 1 deletion Core/Opponents/GrimoraModFinaleOpponent.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using DiskCardGame;
using DiskCardGame;
using InscryptionAPI.Encounters;
using Sirenix.Utilities;
using static GrimoraMod.GrimoraPlugin;
Expand Down
2 changes: 1 addition & 1 deletion Core/Utils/BlueprintUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,7 @@ private static EncounterBlueprintData BuildGrimoraBossRegionBlueprintThreeHard()
new(),
new() { bp_Skelemagus, bp_Skelemagus, bp_Skelemagus },
new() { bp_Zombie },
new() { bp_bp_SkelemagusZombie, bp_Skelemagus },
new() { bp_Skelemagus, bp_Zombie, bp_Skelemagus },
new() { bp_Zombie, bp_Zombie, bp_Zombie, bp_Silbon }
};

Expand Down
3 changes: 3 additions & 0 deletions GrimoraPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,8 @@ private void LoadItems()

AllGrimoraItems.Add(Trowel.NewTrowel(TrowelModel));

AllGrimoraItems.Add(Quill.NewQuill(HandModel));

}

private void AddDebugCards()
Expand Down Expand Up @@ -408,6 +410,7 @@ private void OnDestroy()
ConfigHelper.Instance.HandleHotReloadBefore();
Resources.UnloadUnusedAssets();
GrimoraModBattleSequencer.ActiveEnemyPiece = null;
AnkhGuardCombatSequencer.ActiveEnemyPiece = null;
_harmony?.UnpatchSelf();
}

Expand Down
4 changes: 3 additions & 1 deletion Patches/Chessboard/EnemyManagerPatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ public static bool PrefixModifyPieceToBeAddedToConfigList(
{
// this will correctly place the pieces back if they aren't defeated.
// e.g. from quitting mid match
if (enemy is ChessboardGoatEyePiece) { GrimoraRunState.CurrentRun.PiecesRemovedFromBoard.Add(enemy.name); }
if (enemy is ChessboardGoatEyePiece) { GrimoraRunState.CurrentRun.PiecesRemovedFromBoard.Add(enemy.name);
AnkhGuardCombatSequencer.ActiveEnemyPiece = enemy;
}
else GrimoraModBattleSequencer.ActiveEnemyPiece = enemy;

MapNodeManager.Instance.SetAllNodesInteractable(false);
Expand Down
Loading

0 comments on commit 78ad6c2

Please sign in to comment.