diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-12-08 21:06:52 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-08-20 15:57:08 +0200 |
| commit | 0bf17a624f9aebd7881e40baede3bfe8788879c4 (patch) | |
| tree | 4f1b5384a74382c1fd7b7609109afdda83895a37 /go/game | |
| parent | cf29758fbd8bb1cc0b82a37351e2aa7ddbd2586f (diff) | |
| download | muhqs-game-0bf17a624f9aebd7881e40baede3bfe8788879c4.tar.gz muhqs-game-0bf17a624f9aebd7881e40baede3bfe8788879c4.zip | |
cardImplementations: fix use of wrong nested struct
Diffstat (limited to 'go/game')
| -rw-r--r-- | go/game/cardImplementations.go | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/go/game/cardImplementations.go b/go/game/cardImplementations.go index b015ace8..75ea4dcd 100644 --- a/go/game/cardImplementations.go +++ b/go/game/cardImplementations.go @@ -106,7 +106,7 @@ type greatSwordImpl struct{ cardImplementationBase } func (*greatSwordImpl) onPile(p Permanent) { adjustMelee(p, 2) } func (*greatSwordImpl) onUnpile(p Permanent) { adjustMelee(p, -2) } -type misinformationImpl struct{ cardImplementation } +type misinformationImpl struct{ cardImplementationBase } func (*misinformationImpl) onPlay(s *State, c *Card, _ *Player, _ *Targets) { s.Exile.AddCard(c) @@ -341,7 +341,7 @@ var fishTrapAoE areaEffect = newGrantFullActionEffect("nautics/fisher", }, "gain 2 resource", "fishTrapAction") type fishTrapImpl struct { - cardImplementation + cardImplementationBase aoe areaEffect } @@ -404,13 +404,13 @@ func (*sailorImpl) onUnpile(containing Permanent) { // ====== Kraken Set ====== -type tidesChangeImpl struct{ cardImplementation } +type tidesChangeImpl struct{ cardImplementationBase } func (*tidesChangeImpl) onPlay(s *State, _ *Card, _ *Player, _ *Targets) { s.redistributeMapStoreCards() } -type dejaVuImpl struct{ cardImplementation } +type dejaVuImpl struct{ cardImplementationBase } func (*dejaVuImpl) onPlay(s *State, _ *Card, _ *Player, _ *Targets) { for _, p := range s.Players { @@ -420,7 +420,7 @@ func (*dejaVuImpl) onPlay(s *State, _ *Card, _ *Player, _ *Targets) { } } -type devourThePoorImpl struct{ cardImplementation } +type devourThePoorImpl struct{ cardImplementationBase } func (*devourThePoorImpl) onPlay(s *State, _ *Card, kraken *Player, _ *Targets) { for _, u := range s.EnemyUnits(kraken) { @@ -464,13 +464,7 @@ func (*dolphinImpl) fullActions(u *Unit) []*FullAction { return []*FullAction{a} } -type drownedSailorImpl struct { - cardImplementation - sailorImpl -} - -func (i *drownedSailorImpl) onPile(containing Permanent) { i.sailorImpl.onPile(containing) } -func (i *drownedSailorImpl) onUnpile(containing Permanent) { i.sailorImpl.onUnpile(containing) } +type drownedSailorImpl struct { sailorImpl } func (*drownedSailorImpl) onDrop(sailor Permanent) { sailor.Controller().gameState.destroyPermanent(sailor) @@ -491,7 +485,7 @@ func (*frostPylonAoE) onLeaving(Permanent) { } type frostPylonImpl struct { - cardImplementation + cardImplementationBase aoe frostPylonAoE } @@ -523,7 +517,7 @@ func (i *frostPylonImpl) onLeaving(t *Tile) { } type giganticHailImpl struct { - cardImplementation + cardImplementationBase } func (*giganticHailImpl) playTargets() TargetDesc { return INVALID_TARGET_DESC } @@ -543,7 +537,7 @@ func (*giganticHailImpl) onPlay(s *State, _ *Card, kraken *Player, _ *Targets) { } } -type soldOutImpl struct{ cardImplementation } +type soldOutImpl struct{ cardImplementationBase } func (*soldOutImpl) onPlay(s *State, _ *Card, kraken *Player, _ *Targets) { nStores := len(s.Map.Stores) @@ -559,13 +553,13 @@ func (*soldOutImpl) onPlay(s *State, _ *Card, kraken *Player, _ *Targets) { storeTile.neutralize() } -type supriseImpl struct{ cardImplementation } +type supriseImpl struct{ cardImplementationBase } func (*supriseImpl) onPlay(s *State, _ *Card, kraken *Player, _ *Targets) { kraken.Ctrl.(*KrakenControl).activeSuprise = true } -type tentacleSlapImpl struct{ cardImplementation } +type tentacleSlapImpl struct{ cardImplementationBase } func (*tentacleSlapImpl) playTargets() TargetDesc { return INVALID_TARGET_DESC } @@ -586,7 +580,7 @@ func (*tentacleSlapImpl) onPlay(s *State, _ *Card, kraken *Player, _ *Targets) { } } -type unholyCannonballImpl struct{ cardImplementation } +type unholyCannonballImpl struct{ cardImplementationBase } func (*unholyCannonballImpl) playTargets() TargetDesc { return INVALID_TARGET_DESC } |
