Add pets for tiers 4-6.

This commit is contained in:
Greyson Parrelli
2026-07-23 00:10:20 -04:00
parent 8d43bbf61e
commit 10ac457e2e
11 changed files with 1334 additions and 163 deletions
+209 -36
View File
@@ -23,9 +23,12 @@ const (
// Food identifiers.
const (
FoodApple = "apple"
FoodHoney = "honey"
FoodGarlic = "garlic"
FoodApple = "apple"
FoodHoney = "honey"
FoodGarlic = "garlic"
FoodPineapple = "pineapple"
FoodChili = "chili"
FoodMelon = "melon"
)
// EffectTrigger is when an effect fires.
@@ -41,6 +44,10 @@ const (
// TriggerBattlePrep fires right after the shop phase ends, as players
// begin ordering their decks.
TriggerBattlePrep EffectTrigger = "battlePrep"
// TriggerEnemyFaint fires on a pet in play whenever an enemy pet faints.
TriggerEnemyFaint EffectTrigger = "enemyFaint"
// TriggerEnemyPlay fires on a pet in play whenever the enemy plays a pet.
TriggerEnemyPlay EffectTrigger = "enemyPlay"
// TriggerPassive marks always-on effects (e.g. Garlic's damage
// prevention); they're consulted contextually rather than fired.
TriggerPassive EffectTrigger = "passive"
@@ -73,13 +80,65 @@ const (
// apples back on top of its owner's deck.
ActionRecycleApples EffectAction = "recycleApples"
// ActionDelayedRocks (faint) sets the pet aside: when its owner plays
// their next pet, it throws Count rocks at EACH active pet — the
// enemy's and the owner's own.
// their next pet, it throws Count rocks. With Target "all" (Badger)
// the volley hits EACH active pet — the owner's own included;
// otherwise it targets the enemy pet as usual (Blowfish).
ActionDelayedRocks EffectAction = "delayedRocks"
// ActionRecurringRocks (faint) sets the pet aside: EVERY time its owner
// plays a pet, it throws Count rocks at the enemy pet (Snake).
ActionRecurringRocks EffectAction = "recurringRocks"
// ActionEnemyLastPetRocks (faint) sets the pet aside: when the enemy
// plays the last pet in their deck, it throws Count rocks (Crocodile).
ActionEnemyLastPetRocks EffectAction = "enemyLastPetRocks"
// ActionShieldNext (faint) sets the pet aside: the next Count times a
// friendly pet is hit, ALL damage from that hit is prevented (Turtle).
ActionShieldNext EffectAction = "shieldNext"
// ActionShieldSelf gives the pet itself Count charges that each prevent
// all damage from one hit (Gorilla on hurt, Melon on play).
ActionShieldSelf EffectAction = "shieldSelf"
// ActionStripFoods (play) discards every food attached to the enemy
// pet in play (losing their buffs and perks, which can faint it).
ActionStripFoods EffectAction = "stripFoods"
// ActionStealApples (play) moves up to Count apples from the enemy pet
// to this pet (Wolverine). Losing apples can faint the victim.
ActionStealApples EffectAction = "stealApples"
// ActionMillEnemy (play) discards cards off the top of the enemy deck
// until a non-Bee pet is showing (Chili).
ActionMillEnemy EffectAction = "millEnemy"
// ActionHeal removes Count damage markers from the pet, if it hasn't
// fainted.
ActionHeal EffectAction = "heal"
// ActionKnockout (passive) makes any pet this pet hurts with its clash
// attack faint outright (Scorpion). Rocks don't count, and a fully
// prevented attack KOs nothing.
ActionKnockout EffectAction = "knockout"
// ActionApplesInPlay (battle prep) starts the battle with Count apples
// already in play, attached to the owner's first pet (Monkey).
ActionApplesInPlay EffectAction = "applesInPlay"
// ActionDoubleApples doubles the apples in the player's hand (Cat).
// Shop-time.
ActionDoubleApples EffectAction = "doubleApples"
// ActionBeeAura (faint) sets the pet aside: the owner's Bees have
// +Count power for the rest of the battle (Turkey).
ActionBeeAura EffectAction = "beeAura"
// ActionPetAura (faint) sets the pet aside: the owner's pets have
// +Count power for the rest of the battle (Mammoth).
ActionPetAura EffectAction = "petAura"
)
// Per multipliers for dynamic effect counts.
const PerFaintedBees = "faintedBees" // × friendly bees fainted this battle
const (
PerFaintedBees = "faintedBees" // × friendly bees fainted this battle
PerFaintedPets = "faintedPets" // × friendly pets fainted this battle
PerEatenApples = "eatenApples" // × apples this pet ate (its attached apples)
PerPower = "power" // × this pet's current power
)
// Effect conditions.
const (
ConditionTripled = "tripledThisRound" // player Tripled during this round's shop
ConditionHasPerk = "hasPerk" // this pet has a perk attached
)
// Effect is one trigger→action pair printed on a card.
type Effect struct {
@@ -90,6 +149,10 @@ type Effect struct {
Target string `json:"target,omitempty"` // summonTop: "" (self) | "enemy"
// Per multiplies Count by a battle statistic (e.g. PerFaintedBees).
Per string `json:"per,omitempty"`
// Cap limits the final count when > 0 ("up to N").
Cap int `json:"cap,omitempty"`
// Condition gates the effect (e.g. ConditionTripled).
Condition string `json:"condition,omitempty"`
// MinRound gates the effect to round >= MinRound (0 = always).
MinRound int `json:"minRound,omitempty"`
}
@@ -148,10 +211,7 @@ type foodTemplate struct {
}
// petTiers defines the shop decks' pets. Index 0 is tier 1 (round 1)
// through index 5 for tier 6 (round 6).
//
// Tiers 1-2 are real card data. Tiers 3-6 are placeholders with the same
// structure until their real definitions are provided.
// through index 5 for tier 6 (round 6). All six tiers are real card data.
var petTiers = [MaxRounds][]petTemplate{
{ // Tier 1
{
@@ -253,16 +313,127 @@ var petTiers = [MaxRounds][]petTemplate{
},
{
Name: "Badger", Power: 3, Suits: []Suit{SuitRed, SuitYellow},
Effects: []Effect{{Trigger: TriggerFaint, Action: ActionDelayedRocks, Count: 2}},
Effects: []Effect{{Trigger: TriggerFaint, Action: ActionDelayedRocks, Count: 2, Target: "all"}},
EffectText: "Faint: set aside — when you play your next pet, throw 2 Rocks at each active pet",
},
},
placeholderTier([6]string{"Skunk", "Hippo", "Bison", "Deer", "Squirrel", "Whale"},
[6]int{5, 6, 6, 4, 4, 5}),
placeholderTier([6]string{"Scorpion", "Rhino", "Monkey", "Cow", "Seal", "Shark"},
[6]int{5, 7, 6, 6, 6, 7}),
placeholderTier([6]string{"Leopard", "Boar", "Gorilla", "Mammoth", "Snake", "Tiger"},
[6]int{8, 9, 9, 10, 8, 9}),
{ // Tier 4
{
Name: "Squirrel", Power: 2, Suits: []Suit{SuitRed, SuitBlue},
Effects: []Effect{
{Trigger: TriggerBuy, Action: ActionGainApple, Count: 2},
{Trigger: TriggerSell, Action: ActionGainApple, Count: 2},
},
EffectText: "Buy: add 2 Apples to your hand · Sell: add 2 extra Apples to your hand",
},
{
Name: "Turtle", Power: 2, Suits: []Suit{SuitBlue, SuitYellow},
Effects: []Effect{{Trigger: TriggerFaint, Action: ActionShieldNext}},
EffectText: "Faint: set aside — the next time a friendly pet is hit, prevent all damage",
},
{
Name: "Rooster", Power: 4, Suits: []Suit{SuitYellow, SuitRed},
Effects: []Effect{{Trigger: TriggerFaint, Action: ActionSummonTop, Card: "bee", Per: PerEatenApples, Cap: 3}},
EffectText: "Faint: add a Bee on top of your deck for each Apple this pet ate, up to 3",
},
{
Name: "Bison", Power: 3, Suits: []Suit{SuitBlue, SuitYellow},
Effects: []Effect{{Trigger: TriggerBattlePrep, Action: ActionGainApple, Count: 3, Condition: ConditionTripled}},
EffectText: "Battle Prep: if you Tripled during this round's shop, add 3 Apples to your hand",
},
{
Name: "Blowfish", Power: 3, Suits: []Suit{SuitBlue, SuitRed},
Effects: []Effect{{Trigger: TriggerFaint, Action: ActionDelayedRocks, Count: 3}},
EffectText: "Faint: set aside — when you play your next pet, throw 3 Rocks",
},
{
Name: "Skunk", Power: 2, Suits: []Suit{SuitBlue, SuitYellow},
Effects: []Effect{{Trigger: TriggerPlay, Action: ActionStripFoods}},
EffectText: "Play: discard all Food from the enemy pet",
},
{
Name: "Hippo", Power: 4, Suits: []Suit{SuitRed, SuitYellow},
Effects: []Effect{{Trigger: TriggerEnemyFaint, Action: ActionHeal}},
EffectText: "Enemy Faints: if this pet hasn't fainted, heal 1 damage",
},
},
{ // Tier 5
{
Name: "Monkey", Power: 3, Suits: []Suit{SuitRed, SuitYellow},
Effects: []Effect{{Trigger: TriggerBattlePrep, Action: ActionApplesInPlay, Count: 3}},
EffectText: "Battle Prep: start with 3 Apples in play, attached to your first pet",
},
{
Name: "Rhino", Power: 5, Suits: []Suit{SuitRed, SuitYellow},
Effects: []Effect{{Trigger: TriggerEnemyPlay, Action: ActionThrowRock}},
EffectText: "Enemy Played: throw 1 Rock",
},
{
Name: "Crocodile", Power: 4, Suits: []Suit{SuitRed, SuitBlue},
Effects: []Effect{{Trigger: TriggerFaint, Action: ActionEnemyLastPetRocks, Count: 3}},
EffectText: "Faint: set aside — when the last pet in the enemy deck is played, throw 3 Rocks",
},
{
Name: "Scorpion", Power: 1, Suits: []Suit{SuitBlue, SuitYellow},
Effects: []Effect{{Trigger: TriggerPassive, Action: ActionKnockout}},
EffectText: "This pet KOs any pet it hurts with an attack",
},
{
Name: "Seal", Power: 3, Suits: []Suit{SuitYellow, SuitRed},
Effects: []Effect{{Trigger: TriggerPlay, Action: ActionSummonTop, Card: "apple", Count: 3, Condition: ConditionHasPerk}},
EffectText: "Play: if this pet has a Perk, add 3 Apples on top of your deck",
},
{
Name: "Shark", Power: 1, Suits: []Suit{SuitRed, SuitBlue},
Effects: []Effect{{Trigger: TriggerPlay, Action: ActionEatApple, Per: PerFaintedPets}},
EffectText: "Play: eats 1 Apple for each friendly fainted pet",
},
{
Name: "Turkey", Power: 4, Suits: []Suit{SuitRed, SuitYellow},
Effects: []Effect{{Trigger: TriggerFaint, Action: ActionBeeAura}},
EffectText: "Faint: set aside — your Bees have +1 power",
},
},
{ // Tier 6
{
Name: "Gorilla", Power: 6, Suits: []Suit{SuitBlue, SuitYellow},
Effects: []Effect{{Trigger: TriggerHurt, Action: ActionShieldSelf}},
EffectText: "Hurt: the next time this pet is hit, prevent all damage",
},
{
Name: "Fly", Power: 4, Suits: []Suit{SuitRed, SuitYellow},
Effects: []Effect{{Trigger: TriggerFaint, Action: ActionSummonTop, Card: "bee", Count: 3}},
EffectText: "Faint: add 3 Bees on top of your deck",
},
{
Name: "Leopard", Power: 4, Suits: []Suit{SuitRed, SuitBlue},
Effects: []Effect{{Trigger: TriggerPlay, Action: ActionThrowRock, Per: PerPower}},
EffectText: "Play: throw Rocks equal to this pet's power",
},
{
Name: "Mammoth", Power: 4, Suits: []Suit{SuitYellow, SuitRed},
Effects: []Effect{{Trigger: TriggerFaint, Action: ActionPetAura}},
EffectText: "Faint: set aside — your pets have +1 power",
},
{
Name: "Cat", Power: 2, Suits: []Suit{SuitYellow, SuitBlue},
Effects: []Effect{
{Trigger: TriggerBuy, Action: ActionGainApple, Count: 2},
{Trigger: TriggerBuy, Action: ActionDoubleApples},
},
EffectText: "Buy: add 2 Apples to your hand, then double your Apples in hand",
},
{
Name: "Snake", Power: 2, Suits: []Suit{SuitRed, SuitBlue},
Effects: []Effect{{Trigger: TriggerFaint, Action: ActionRecurringRocks, Count: 2}},
EffectText: "Faint: set aside — each time you play a pet, throw 2 Rocks",
},
{
Name: "Wolverine", Power: 5, Suits: []Suit{SuitBlue, SuitRed},
Effects: []Effect{{Trigger: TriggerPlay, Action: ActionStealApples, Count: 3}},
EffectText: "Play: steal up to 3 Apples from the enemy pet",
},
},
}
// foodTiers defines the food cards mixed into each tier's shop deck.
@@ -282,25 +453,27 @@ var foodTiers = [MaxRounds][]foodTemplate{
EffectText: "Every attack that hits this pet deals 1 less damage",
},
},
{}, {}, {},
}
// placeholderTier mirrors tier 1's suit distribution (each suit appears on 4
// of the 12 cards) for pets whose real definitions aren't in yet.
func placeholderTier(names [6]string, powers [6]int) []petTemplate {
suitPairs := [6][]Suit{
{SuitBlue, SuitYellow},
{SuitRed, SuitBlue},
{SuitYellow, SuitBlue},
{SuitYellow, SuitRed},
{SuitRed, SuitBlue},
{SuitYellow, SuitRed},
}
tier := make([]petTemplate, 6)
for i := range names {
tier[i] = petTemplate{Name: names[i], Power: powers[i], Suits: suitPairs[i]}
}
return tier
{ // Tier 4
{
Name: "Pineapple", Food: FoodPineapple, Copies: 2, Perk: true,
Effects: []Effect{{Trigger: TriggerPlay, Action: ActionThrowRock, Count: 3}},
EffectText: "Play: throw 3 Rocks",
},
},
{ // Tier 5
{
Name: "Chili", Food: FoodChili, Copies: 2, Perk: true,
Effects: []Effect{{Trigger: TriggerPlay, Action: ActionMillEnemy}},
EffectText: "Play: discard cards from the top of the enemy deck until a non-Bee pet is showing",
},
},
{ // Tier 6
{
Name: "Melon", Food: FoodMelon, Copies: 2, Perk: true,
Effects: []Effect{{Trigger: TriggerPlay, Action: ActionShieldSelf}},
EffectText: "The first time this pet is hit, prevent all damage",
},
},
}
// newCardID mints a unique card ID within the game.