From 14454cfd5e044eb830318603b081e24de0d46f2d Mon Sep 17 00:00:00 2001 From: Sander Schobers Date: Mon, 11 May 2020 00:46:26 +0200 Subject: [PATCH] Switched coneflower & tulip. --- flower.go | 32 ++++++++++++++++---------------- game.go | 22 +++++++++++----------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/flower.go b/flower.go index 5f190b0..f50a3e9 100644 --- a/flower.go +++ b/flower.go @@ -32,8 +32,8 @@ type FlowerResistance struct { Wet float32 } -// NewPoppyTraits creates the traits of a anemone, a very generic flower that thrives in a moderate climate. -func NewPoppyTraits() FlowerTraits { +// NewAnemoneTraits creates the traits of a anemone, a very generic flower that thrives in a moderate climate. +func NewAnemoneTraits() FlowerTraits { return FlowerTraits{ Spread: 0.0004, Life: 0.99993, @@ -59,6 +59,19 @@ func NewLoosestrifeTraits() FlowerTraits { } } +func NewConeflowerTraits() FlowerTraits { + return FlowerTraits{ + Spread: 0.0005, + Life: 0.99993, + Resistance: FlowerResistance{ + Cold: 0.7, + Hot: 0.8, + Dry: 0.8, + Wet: 0.5, + }, + } +} + func NewTulipTraits() FlowerTraits { return FlowerTraits{ Spread: 0.0005, @@ -67,20 +80,7 @@ func NewTulipTraits() FlowerTraits { Cold: 0.8, Hot: 0.6, Dry: 0.5, - Wet: 0.8, - }, - } -} - -func NewConeflowerTraits() FlowerTraits { - return FlowerTraits{ - Spread: 0.0005, - Life: 0.99993, - Resistance: FlowerResistance{ - Cold: 0.7, - Hot: 0.8, - Dry: 0.9, - Wet: 0.5, + Wet: 0.9, }, } } diff --git a/game.go b/game.go index fbf5cb7..2fa3184 100644 --- a/game.go +++ b/game.go @@ -46,7 +46,7 @@ func NewGame() *Game { IconTemplate: "flower-anemone-%s", BuyPrice: 10, SellPrice: 3, - Traits: NewPoppyTraits(), + Traits: NewAnemoneTraits(), Unlocked: true, }) herbarium.Add("loosestrife", FlowerDescriptor{ @@ -58,22 +58,22 @@ func NewGame() *Game { Traits: NewLoosestrifeTraits(), Unlocked: false, }) - herbarium.Add("tulip", FlowerDescriptor{ - Name: "Tulip", - Description: "A lovely flower that prefers a bit humid and colder climates.", - IconTemplate: "flower-tulip-%s", - BuyPrice: 500, - SellPrice: 100, - Traits: NewTulipTraits(), - Unlocked: false, - }) herbarium.Add("coneflower", FlowerDescriptor{ Name: "Coneflower", Description: "A beautifull flower that can withstand hotter climates.", IconTemplate: "flower-coneflower-%s", + BuyPrice: 500, + SellPrice: 100, + Traits: NewConeflowerTraits(), + Unlocked: false, + }) + herbarium.Add("tulip", FlowerDescriptor{ + Name: "Tulip", + Description: "A lovely flower that prefers a bit humid and colder climates.", + IconTemplate: "flower-tulip-%s", BuyPrice: 20000, SellPrice: 5000, - Traits: NewConeflowerTraits(), + Traits: NewTulipTraits(), Unlocked: false, }) herbarium.Add("ajuga", FlowerDescriptor{