m |
m |
||
| Line 10: | Line 10: | ||
|- | |- | ||
| style="vertical-align: top;" | | | style="vertical-align: top;" | | ||
| − | * SpecificCard.cs: Contains the logic related to specific cards and abilities such as `OnUseAbility()`, `CanUseAbility()`, `StartTargetingForSeek()`, `GetAbilityTargets()`, and `DoSeek()`.<br /> <br /> | + | * SpecificCard.cs: Contains the logic related to specific cards and abilities such as `OnUseAbility()`, `CanUseAbility()`, `StartTargetingForSeek()`, `GetAbilityTargets()`, and `DoSeek()`.<br /><br /> |
| − | + | ||
* GameModel.cs: Manages the core game functions, such as `RemoveDeck()`, `ShowCardForPlayer()`, `AddHand()`, and `ShuffleDeck()`. | * GameModel.cs: Manages the core game functions, such as `RemoveDeck()`, `ShowCardForPlayer()`, `AddHand()`, and `ShuffleDeck()`. | ||
| style="vertical-align: top;" | | | style="vertical-align: top;" | | ||
| Line 17: | Line 16: | ||
* DoSeek | * DoSeek | ||
* Seek | * Seek | ||
| − | *StartTargetingForSeek | + | * StartTargetingForSeek |
* GetAbilityTargets | * GetAbilityTargets | ||
* RemoveDeck | * RemoveDeck | ||
| Line 23: | Line 22: | ||
* AddHand | * AddHand | ||
|- | |- | ||
| − | ! colspan="2" | Code | + | ! colspan="2" | Code Seek: |
|- | |- | ||
| colspan="2" | Summary of the Seek process: | | colspan="2" | Summary of the Seek process: | ||
| Line 37: | Line 36: | ||
# `ShuffleOurDeck()`: Shuffles the deck after the seek is completed. | # `ShuffleOurDeck()`: Shuffles the deck after the seek is completed. | ||
|- | |- | ||
| − | | colspan="2"| This code is a collection of all the functions involved in the '''Seek''' mechanic, though it doesn't exist as a single block in any one file. | + | | colspan="2" | This code is a collection of all the functions involved in the '''Seek''' mechanic, though it doesn't exist as a single block in any one file. |
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
| Line 140: | Line 139: | ||
public static void RemoveDeck(ShadowEraCard card) | public static void RemoveDeck(ShadowEraCard card) | ||
{ | { | ||
| − | // Code | + | // Code that handles removing a card from the deck |
} | } | ||
| Line 159: | Line 158: | ||
public static void AddHand(ShadowEraCard card) | public static void AddHand(ShadowEraCard card) | ||
{ | { | ||
| − | // Code | + | // Code that handles adding a card to the player's hand |
} | } | ||
public static void OnSeek(ShadowEraCard card) | public static void OnSeek(ShadowEraCard card) | ||
{ | { | ||
| − | // | + | // Handles additional effects or actions after the card is added to the hand |
} | } | ||
| Line 173: | Line 172: | ||
</syntaxhighlight></small> | </syntaxhighlight></small> | ||
|} | |} | ||
| + | |||
== English Explanation == | == English Explanation == | ||


| File References in the Game | Terms to Locate Seek Reference |
|---|---|
|
|
| Code Seek: | |
Summary of the Seek process:
| |
| This code is a collection of all the functions involved in the Seek mechanic, though it doesn't exist as a single block in any one file. | |
public override void OnUseAbility() { if (!isPartTwo) { if (!parent.IsDead()) { MoveToCastPosition(); GameModel.QueuePart2(parent); isPartTwo = true; } } else { isPartTwo = false; DoSeek(usedShadowEnergy: true); } } public override bool CanUseAbility() { if (GameModel.isSimulating) { return false; } if (GameModel.DeckCount() == 0) { return false; } if (GameModel.HandCount() == GameModel.MaxHandSize()) { return false; } return true; } public void StartTargetingForSeek() { ClearTargets(); MoveToCastPosition(); GameModel.UnhighlightCards(); GameModel.SetGameState(GameState.GameStateType.target); List<ShadowEraCard> abilityTargets = GetAbilityTargets(); for (int i = 0; i < GameModel.DeckCount(); i++) { ShadowEraCard deck = GameModel.GetDeck(i); if (abilityTargets.Contains(deck)) { GameModel.RemoveDeck(deck); i--; } } for (int j = 0; j < abilityTargets.Count; j++) { GameModel.AddDeck(abilityTargets[j]); } GameModel.HighlightCards(GetAbilityTargets()); DeckListDisplay.abilityCard = parent; DeckListDisplay.ShowDeck(GameModel.CurSide()); } public override List<ShadowEraCard> GetAbilityTargets() { List<ShadowEraCard> list = new List<ShadowEraCard>(); for (int i = 0; i < GameModel.DeckCount(); i++) { ShadowEraCard deck = GameModel.GetDeck(i); if (IsValidAbilityTarget(deck)) { list.Add(deck); } } return list; } private static bool IsValidAbilityTarget(ShadowEraCard check) { return check.cardType == CardTypeEnum.Ally && check.cardSubType == CardSubTypeEnum.Aldmor; } public void DoSeek(bool usedShadowEnergy) { DeckListDisplay.CloseDeck(); if (targets.Count > 0 && GameModel.HandCount() < GameModel.MaxHandSize()) { GameModel.RemoveDeck(targets[0]); GameModel.ShowCardForPlayer(targets[0]); GameModel.AddHand(targets[0]); GameModel.OnSeek(targets[0]); } else { GameModel.OnSeek(null); } ShuffleOurDeck(); targets.Clear(); } public static void RemoveDeck(ShadowEraCard card) { // Code that handles removing a card from the deck } public static void ShowCardForPlayer(ShadowEraCard card) { if (!isSimulating && Gameplay.Instance != null) { Gameplay.Instance.UpdateHand(forceUpdate: true); Gameplay.Instance.ShowCard(card); Gameplay.Instance.BlockInput(2f); if (card.gameObject != null) { CoroutineManager.Start(_ShowCardForPlayer(card)); } } } public static void AddHand(ShadowEraCard card) { // Code that handles adding a card to the player's hand } public static void OnSeek(ShadowEraCard card) { // Handles additional effects or actions after the card is added to the hand } public void ShuffleOurDeck() { GameModel.ShuffleDeck(); } | |
Alan said: "Card effects take precedence over the game rules."`
| void PlayFaceDown(ShadowEraCard card, bool isSeeked)
{ if (isSeeked)
{
// Allow ShowCardForPlayer() to be invoked for Seeked cards
ShowCardForPlayer(card);
}
else
{
// Keep the card face-down as usual (normal Trap behavior)
KeepCardFaceDown(card);
}
} |