-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated for version 31.0.0
- Loading branch information
Showing
36 changed files
with
713 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
HSTracker/Hearthstone/CounterSystem/Counters/AsteroidExtraDamageCounter.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// | ||
// AsteroidExtraDamageCounter.swift | ||
// HSTracker | ||
// | ||
// Created by Francisco Moraes on 10/30/24. | ||
// Copyright © 2024 Benjamin Michotte. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
class AsteroidExtraDamageCounter: NumericCounter { | ||
override var localizedName: String { | ||
return String.localizedString("Counter_AsteroidDamage", comment: "") | ||
} | ||
|
||
override var cardIdToShowInUI: String? { | ||
return CardIds.NonCollectible.Neutral.Asteroid | ||
} | ||
|
||
override var relatedCards: [String] { | ||
return [] | ||
} | ||
|
||
required init(controlledByPlayer: Bool, game: Game) { | ||
super.init(controlledByPlayer: controlledByPlayer, game: game) | ||
} | ||
|
||
override func shouldShow() -> Bool { | ||
return !game.isBattlegroundsMatch() && counter > 0 | ||
} | ||
|
||
override func getCardsToDisplay() -> [String] { | ||
return [CardIds.NonCollectible.Neutral.Asteroid] | ||
} | ||
|
||
override var isDisplayValueLong: Bool { | ||
return true | ||
} | ||
|
||
override func valueToShow() -> String { | ||
return String(format: String.localizedString("Counter_AsteroidDamage_Damage", comment: ""), 2 + counter) | ||
} | ||
|
||
override func handleTagChange(tag: GameTag, entity: Entity, value: Int, prevValue: Int) { | ||
if entity.isControlled(by: game.player.id) == isPlayerCounter { | ||
if tag == .gametag_3559 { | ||
counter = value | ||
} | ||
} | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
HSTracker/Hearthstone/CounterSystem/Counters/KiljaedenCounter.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// | ||
// KiljaedenCounter.swift | ||
// HSTracker | ||
// | ||
// Created by Francisco Moraes on 10/30/24. | ||
// Copyright © 2024 Benjamin Michotte. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
class KiljaedenCounter: StatsCounter { | ||
override var cardIdToShowInUI: String? { | ||
return CardIds.Collectible.Neutral.Kiljaeden | ||
} | ||
|
||
override var relatedCards: [String] { | ||
return [] | ||
} | ||
|
||
required init(controlledByPlayer: Bool, game: Game) { | ||
super.init(controlledByPlayer: controlledByPlayer, game: game) | ||
} | ||
|
||
override func shouldShow() -> Bool { | ||
return game.isTraditionalHearthstoneMatch && (attackCounter > 0 || healthCounter > 0) | ||
} | ||
|
||
override func getCardsToDisplay() -> [String] { | ||
return [CardIds.Collectible.Neutral.Kiljaeden] | ||
} | ||
|
||
override func valueToShow() -> String { | ||
return "+\(max(0, attackCounter)) / +\(max(0, healthCounter))" | ||
} | ||
|
||
override func handleTagChange(tag: GameTag, entity: Entity, value: Int, prevValue: Int) { | ||
guard game.isTraditionalHearthstoneMatch else { return } | ||
guard entity.card.id == CardIds.NonCollectible.Neutral.Kiljaeden_KiljaedensPortalEnchantment else { return } | ||
guard entity.isControlled(by: game.player.id) == isPlayerCounter else { return } | ||
|
||
attackCounter = entity[.tag_script_data_num_2] | ||
healthCounter = entity[.tag_script_data_num_2] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
HSTracker/Hearthstone/EffectSystem/Effects/Mage/IngeniousArtificerEnchantment.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// | ||
// IngeniousArtificerEnchantment.swift | ||
// HSTracker | ||
// | ||
// Created by Francisco Moraes on 10/30/24. | ||
// Copyright © 2024 Benjamin Michotte. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
class IngeniousArtificerEnchantment: EntityBasedEffect { | ||
override var cardId: String { | ||
return CardIds.NonCollectible.Mage.IngeniousArtificer_IngeniousArtficerFutureBuffEnchantment | ||
} | ||
|
||
override var cardIdToShowInUI: String { | ||
return CardIds.Collectible.Mage.IngeniousArtificer | ||
} | ||
|
||
required init(entityId: Int, isControlledByPlayer: Bool) { | ||
super.init(entityId: entityId, isControlledByPlayer: isControlledByPlayer) | ||
} | ||
|
||
override var effectDuration: EffectDuration { | ||
return .conditional | ||
} | ||
|
||
override var effectTag: EffectTag { | ||
return .manaCrystalModification | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
HSTracker/Hearthstone/EffectSystem/Effects/Neutral/AceWayfinderEnchantment.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// | ||
// AceWayfinderEnchantment.swift | ||
// HSTracker | ||
// | ||
// Created by Francisco Moraes on 10/30/24. | ||
// Copyright © 2024 Benjamin Michotte. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
class AceWayfinderEnchantment: EntityBasedEffect { | ||
override var cardId: String { | ||
return CardIds.NonCollectible.Neutral.AceWayfinder_AceWayfinderFutureBuffEnchantment | ||
} | ||
|
||
override var cardIdToShowInUI: String { | ||
return CardIds.Collectible.Neutral.AceWayfinder | ||
} | ||
|
||
required init(entityId: Int, isControlledByPlayer: Bool) { | ||
super.init(entityId: entityId, isControlledByPlayer: isControlledByPlayer) | ||
} | ||
|
||
override var effectDuration: EffectDuration { | ||
return .conditional | ||
} | ||
|
||
override var effectTag: EffectTag { | ||
return .minionModification | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
HSTracker/Hearthstone/EffectSystem/Effects/Neutral/AstrobiologistEnchantment.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// | ||
// AstrobiologistEnchantment.swift | ||
// HSTracker | ||
// | ||
// Created by Francisco Moraes on 10/30/24. | ||
// Copyright © 2024 Benjamin Michotte. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
class AstrobiologistEnchantment: EntityBasedEffect { | ||
override var cardId: String { | ||
return CardIds.NonCollectible.Neutral.Astrobiologist_AstrobiologistEnchantment | ||
} | ||
|
||
override var cardIdToShowInUI: String { | ||
return CardIds.Collectible.Neutral.Astrobiologist | ||
} | ||
|
||
required init(entityId: Int, isControlledByPlayer: Bool) { | ||
super.init(entityId: entityId, isControlledByPlayer: isControlledByPlayer) | ||
} | ||
|
||
override var effectDuration: EffectDuration { | ||
return .conditional | ||
} | ||
|
||
override var effectTag: EffectTag { | ||
return .minionModification | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
HSTracker/Hearthstone/EffectSystem/Effects/Neutral/SpacePirateEnchantment.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// | ||
// SpacePirateEnchantment.swift | ||
// HSTracker | ||
// | ||
// Created by Francisco Moraes on 10/30/24. | ||
// Copyright © 2024 Benjamin Michotte. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
class SpacePirateEnchantment: EntityBasedEffect { | ||
override var cardId: String { | ||
return CardIds.NonCollectible.Neutral.SpacePirate_SpacePiracyEnchantment | ||
} | ||
|
||
override var cardIdToShowInUI: String { | ||
return CardIds.Collectible.Neutral.SpacePirate | ||
} | ||
|
||
required init(entityId: Int, isControlledByPlayer: Bool) { | ||
super.init(entityId: entityId, isControlledByPlayer: isControlledByPlayer) | ||
} | ||
|
||
override var effectTarget: EffectTarget { | ||
return .myself | ||
} | ||
|
||
override var effectDuration: EffectDuration { | ||
return .conditional | ||
} | ||
|
||
override var effectTag: EffectTag { | ||
return .costModification | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
HSTracker/Hearthstone/EffectSystem/Effects/Neutral/StarlightWandererEnchantment.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// | ||
// StarlightWandererEnchantment.swift | ||
// HSTracker | ||
// | ||
// Created by Francisco Moraes on 10/30/24. | ||
// Copyright © 2024 Benjamin Michotte. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
class StarlightWandererEnchantment: EntityBasedEffect { | ||
override var cardId: String { | ||
return CardIds.NonCollectible.Neutral.StarlightWanderer_StarlightWandererFutureBuffEnchantment | ||
} | ||
|
||
override var cardIdToShowInUI: String { | ||
return CardIds.Collectible.Neutral.StarlightWanderer | ||
} | ||
|
||
required init(entityId: Int, isControlledByPlayer: Bool) { | ||
super.init(entityId: entityId, isControlledByPlayer: isControlledByPlayer) | ||
} | ||
|
||
override var effectDuration: EffectDuration { | ||
return .conditional | ||
} | ||
|
||
override var effectTag: EffectTag { | ||
return .minionModification | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
HSTracker/Hearthstone/EffectSystem/Effects/Neutral/StrandedSpacemanEnchantment.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// | ||
// StrandedSpacemanEnchantment.swift | ||
// HSTracker | ||
// | ||
// Created by Francisco Moraes on 10/30/24. | ||
// Copyright © 2024 Benjamin Michotte. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
class StrandedSpacemanEnchantment: EntityBasedEffect { | ||
override var cardId: String { | ||
return CardIds.NonCollectible.Neutral.StrandedSpaceman_StrandedSpacemanFutureBuffEnchantment | ||
} | ||
|
||
override var cardIdToShowInUI: String { | ||
return CardIds.Collectible.Neutral.StrandedSpaceman | ||
} | ||
|
||
required init(entityId: Int, isControlledByPlayer: Bool) { | ||
super.init(entityId: entityId, isControlledByPlayer: isControlledByPlayer) | ||
} | ||
|
||
override var effectDuration: EffectDuration { | ||
return .conditional | ||
} | ||
|
||
override var effectTag: EffectTag { | ||
return .minionModification | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
HSTracker/Hearthstone/EffectSystem/Effects/Priest/AskaraEnchantment.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// | ||
// AskaraEnchantment.swift | ||
// HSTracker | ||
// | ||
// Created by Francisco Moraes on 10/30/24. | ||
// Copyright © 2024 Benjamin Michotte. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
class AskaraEnchantment: EntityBasedEffect { | ||
override var cardId: String { | ||
return CardIds.NonCollectible.Priest.Askara_AskaraFutureBuffEnchantment | ||
} | ||
|
||
override var cardIdToShowInUI: String { | ||
return CardIds.Collectible.Priest.Askara | ||
} | ||
|
||
required init(entityId: Int, isControlledByPlayer: Bool) { | ||
super.init(entityId: entityId, isControlledByPlayer: isControlledByPlayer) | ||
} | ||
|
||
override var effectDuration: EffectDuration { | ||
return .conditional | ||
} | ||
|
||
override var effectTag: EffectTag { | ||
return .costModification | ||
} | ||
} |
Oops, something went wrong.