-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
1,390 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
module Evergreen.Migrate.V132 exposing (..) | ||
|
||
{-| This migration file was automatically generated by the lamdera compiler. | ||
It includes: | ||
- A migration for each of the 6 Lamdera core types that has changed | ||
- A function named `migrate_ModuleName_TypeName` for each changed/custom type | ||
Expect to see: | ||
- `Unimplementеd` values as placeholders wherever I was unable to figure out a clear migration path for you | ||
- `@NOTICE` comments for things you should know about, i.e. new custom type constructors that won't get any | ||
value mappings from the old type by default | ||
You can edit this file however you wish! It won't be generated again. | ||
See <https://dashboard.lamdera.app/docs/evergreen> for more info. | ||
-} | ||
|
||
import Evergreen.V129.Types | ||
import Evergreen.V132.Types | ||
import Lamdera.Migrations exposing (..) | ||
|
||
|
||
frontendModel : Evergreen.V129.Types.FrontendModel -> ModelMigration Evergreen.V132.Types.FrontendModel Evergreen.V132.Types.FrontendMsg | ||
frontendModel _ = | ||
ModelReset | ||
|
||
|
||
backendModel : Evergreen.V129.Types.BackendModel -> ModelMigration Evergreen.V132.Types.BackendModel Evergreen.V132.Types.BackendMsg | ||
backendModel _ = | ||
ModelReset | ||
|
||
|
||
frontendMsg : Evergreen.V129.Types.FrontendMsg -> MsgMigration Evergreen.V132.Types.FrontendMsg Evergreen.V132.Types.FrontendMsg | ||
frontendMsg _ = | ||
MsgOldValueIgnored | ||
|
||
|
||
toBackend : Evergreen.V129.Types.ToBackend -> MsgMigration Evergreen.V132.Types.ToBackend Evergreen.V132.Types.BackendMsg | ||
toBackend _ = | ||
MsgOldValueIgnored | ||
|
||
|
||
backendMsg : Evergreen.V129.Types.BackendMsg -> MsgMigration Evergreen.V132.Types.BackendMsg Evergreen.V132.Types.BackendMsg | ||
backendMsg _ = | ||
MsgOldValueIgnored | ||
|
||
|
||
toFrontend : Evergreen.V129.Types.ToFrontend -> MsgMigration Evergreen.V132.Types.ToFrontend Evergreen.V132.Types.FrontendMsg | ||
toFrontend _ = | ||
MsgOldValueIgnored |
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,24 @@ | ||
module Evergreen.V132.Data.Auth exposing (..) | ||
|
||
|
||
type Plaintext | ||
= Plaintext | ||
|
||
|
||
type Password a | ||
= Password String | ||
|
||
|
||
type alias Auth a = | ||
{ name : String | ||
, password : Password a | ||
, worldName : String | ||
} | ||
|
||
|
||
type Verified | ||
= Verified | ||
|
||
|
||
type Hashed | ||
= Hashed |
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,33 @@ | ||
module Evergreen.V132.Data.Barter exposing (..) | ||
|
||
import Dict | ||
import Evergreen.V132.Data.Item | ||
import SeqDict | ||
|
||
|
||
type Message | ||
= BarterIsEmpty | ||
| PlayerOfferNotValuableEnough | ||
| YouGaveStuffForFree | ||
|
||
|
||
type TransferNPosition | ||
= PlayerKeptItem Evergreen.V132.Data.Item.Id | ||
| VendorKeptItem Evergreen.V132.Data.Item.Id | ||
| PlayerTradedItem Evergreen.V132.Data.Item.Id | ||
| VendorTradedItem Evergreen.V132.Data.Item.Id | ||
| PlayerKeptCaps | ||
| VendorKeptCaps | ||
| PlayerTradedCaps | ||
| VendorTradedCaps | ||
|
||
|
||
type alias State = | ||
{ playerItems : Dict.Dict Evergreen.V132.Data.Item.Id Int | ||
, vendorItems : Dict.Dict Evergreen.V132.Data.Item.Id Int | ||
, playerCaps : Int | ||
, vendorCaps : Int | ||
, lastMessage : Maybe Message | ||
, transferNInputs : SeqDict.SeqDict TransferNPosition String | ||
, activeN : Maybe TransferNPosition | ||
} |
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,20 @@ | ||
module Evergreen.V132.Data.Enemy.Type exposing (..) | ||
|
||
|
||
type EnemyType | ||
= SilverGecko | ||
| ToughSilverGecko | ||
| GoldenGecko | ||
| ToughGoldenGecko | ||
| FireGecko | ||
| ToughFireGecko | ||
| Brahmin | ||
| AngryBrahmin | ||
| WeakBrahmin | ||
| WildBrahmin | ||
| GiantAnt | ||
| ToughGiantAnt | ||
| BlackRadscorpion | ||
| LesserBlackRadscorpion | ||
| LesserRadscorpion | ||
| Radscorpion |
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,88 @@ | ||
module Evergreen.V132.Data.Fight exposing (..) | ||
|
||
import Evergreen.V132.Data.Fight.AttackStyle | ||
import Evergreen.V132.Data.Fight.Critical | ||
import Evergreen.V132.Data.Fight.OpponentType | ||
import Evergreen.V132.Data.Item | ||
import Evergreen.V132.Data.Item.Kind | ||
|
||
|
||
type Who | ||
= Attacker | ||
| Target | ||
|
||
|
||
type CommandRejectionReason | ||
= Heal_ItemNotPresent | ||
| Heal_ItemDoesNotHeal | ||
| Heal_AlreadyFullyHealed | ||
| HealWithAnything_NoHealingItem | ||
| HealWithAnything_AlreadyFullyHealed | ||
| MoveForward_AlreadyNextToEachOther | ||
| Attack_NotCloseEnough | ||
| Attack_NotEnoughAP | ||
|
||
|
||
type Action | ||
= Start | ||
{ distanceHexes : Int | ||
} | ||
| ComeCloser | ||
{ hexes : Int | ||
, remainingDistanceHexes : Int | ||
} | ||
| Attack | ||
{ damage : Int | ||
, attackStyle : Evergreen.V132.Data.Fight.AttackStyle.AttackStyle | ||
, remainingHp : Int | ||
, critical : Maybe ( List Evergreen.V132.Data.Fight.Critical.Effect, Evergreen.V132.Data.Fight.Critical.Message ) | ||
, apCost : Int | ||
} | ||
| Miss | ||
{ attackStyle : Evergreen.V132.Data.Fight.AttackStyle.AttackStyle | ||
, apCost : Int | ||
} | ||
| Heal | ||
{ itemKind : Evergreen.V132.Data.Item.Kind.Kind | ||
, healedHp : Int | ||
, newHp : Int | ||
} | ||
| SkipTurn | ||
| KnockedOut | ||
| StandUp | ||
{ apCost : Int | ||
} | ||
| FailToDoAnything CommandRejectionReason | ||
|
||
|
||
type Result | ||
= AttackerWon | ||
{ xpGained : Int | ||
, capsGained : Int | ||
, itemsGained : List Evergreen.V132.Data.Item.Item | ||
} | ||
| TargetWon | ||
{ xpGained : Int | ||
, capsGained : Int | ||
, itemsGained : List Evergreen.V132.Data.Item.Item | ||
} | ||
| TargetAlreadyDead | ||
| BothDead | ||
| NobodyDead | ||
| NobodyDeadGivenUp | ||
|
||
|
||
type alias Equipment = | ||
{ weapon : Maybe Evergreen.V132.Data.Item.Kind.Kind | ||
, armor : Maybe Evergreen.V132.Data.Item.Kind.Kind | ||
} | ||
|
||
|
||
type alias Info = | ||
{ attacker : Evergreen.V132.Data.Fight.OpponentType.OpponentType | ||
, target : Evergreen.V132.Data.Fight.OpponentType.OpponentType | ||
, log : List ( Who, Action ) | ||
, result : Result | ||
, attackerEquipment : Maybe Equipment | ||
, targetEquipment : Maybe Equipment | ||
} |
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,12 @@ | ||
module Evergreen.V132.Data.Fight.AimedShot exposing (..) | ||
|
||
|
||
type AimedShot | ||
= Head | ||
| Torso | ||
| Eyes | ||
| Groin | ||
| LeftArm | ||
| RightArm | ||
| LeftLeg | ||
| RightLeg |
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,14 @@ | ||
module Evergreen.V132.Data.Fight.AttackStyle exposing (..) | ||
|
||
import Evergreen.V132.Data.Fight.AimedShot | ||
|
||
|
||
type AttackStyle | ||
= UnarmedUnaimed | ||
| UnarmedAimed Evergreen.V132.Data.Fight.AimedShot.AimedShot | ||
| MeleeUnaimed | ||
| MeleeAimed Evergreen.V132.Data.Fight.AimedShot.AimedShot | ||
| Throw | ||
| ShootSingleUnaimed | ||
| ShootSingleAimed Evergreen.V132.Data.Fight.AimedShot.AimedShot | ||
| ShootBurst |
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,22 @@ | ||
module Evergreen.V132.Data.Fight.Critical exposing (..) | ||
|
||
|
||
type Effect | ||
= Knockout | ||
| Knockdown | ||
| CrippledLeftLeg | ||
| CrippledRightLeg | ||
| CrippledLeftArm | ||
| CrippledRightArm | ||
| Blinded | ||
| Death | ||
| BypassArmor | ||
| LoseNextTurn | ||
|
||
|
||
type Message | ||
= PlayerMessage | ||
{ you : String | ||
, them : String | ||
} | ||
| OtherMessage String |
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,15 @@ | ||
module Evergreen.V132.Data.Fight.OpponentType exposing (..) | ||
|
||
import Evergreen.V132.Data.Enemy.Type | ||
import Evergreen.V132.Data.Player.PlayerName | ||
|
||
|
||
type alias PlayerOpponent = | ||
{ name : Evergreen.V132.Data.Player.PlayerName.PlayerName | ||
, xp : Int | ||
} | ||
|
||
|
||
type OpponentType | ||
= Npc Evergreen.V132.Data.Enemy.Type.EnemyType | ||
| Player PlayerOpponent |
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,66 @@ | ||
module Evergreen.V132.Data.FightStrategy exposing (..) | ||
|
||
import Evergreen.V132.Data.Fight.AttackStyle | ||
import Evergreen.V132.Data.Item.Kind | ||
|
||
|
||
type Value | ||
= MyHP | ||
| MyMaxHP | ||
| MyAP | ||
| MyItemCount Evergreen.V132.Data.Item.Kind.Kind | ||
| MyHealingItemCount | ||
| MyAmmoCount | ||
| ItemsUsed Evergreen.V132.Data.Item.Kind.Kind | ||
| HealingItemsUsed | ||
| AmmoUsed | ||
| ChanceToHit Evergreen.V132.Data.Fight.AttackStyle.AttackStyle | ||
| RangeNeeded Evergreen.V132.Data.Fight.AttackStyle.AttackStyle | ||
| Distance | ||
| Number Int | ||
|
||
|
||
type Operator | ||
= LT_ | ||
| LTE | ||
| EQ_ | ||
| NE | ||
| GTE | ||
| GT_ | ||
|
||
|
||
type alias OperatorData = | ||
{ lhs : Value | ||
, op : Operator | ||
, rhs : Value | ||
} | ||
|
||
|
||
type Condition | ||
= Or Condition Condition | ||
| And Condition Condition | ||
| Operator OperatorData | ||
| OpponentIsPlayer | ||
| OpponentIsNPC | ||
|
||
|
||
type alias IfData = | ||
{ condition : Condition | ||
, then_ : FightStrategy | ||
, else_ : FightStrategy | ||
} | ||
|
||
|
||
type Command | ||
= Attack Evergreen.V132.Data.Fight.AttackStyle.AttackStyle | ||
| AttackRandomly | ||
| Heal Evergreen.V132.Data.Item.Kind.Kind | ||
| HealWithAnything | ||
| MoveForward | ||
| DoWhatever | ||
| SkipTurn | ||
|
||
|
||
type FightStrategy | ||
= If IfData | ||
| Command Command |
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,13 @@ | ||
module Evergreen.V132.Data.FightStrategy.Help exposing (..) | ||
|
||
|
||
type Reference | ||
= Strategy | ||
| Command | ||
| Condition | ||
| Attack | ||
| Aim | ||
| Item | ||
| Value | ||
| Operator | ||
| Number |
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,16 @@ | ||
module Evergreen.V132.Data.HealthStatus exposing (..) | ||
|
||
|
||
type HealthStatus | ||
= ExactHp | ||
{ current : Int | ||
, max : Int | ||
} | ||
| Unhurt | ||
| SlightlyWounded | ||
| Wounded | ||
| SeverelyWounded | ||
| AlmostDead | ||
| Dead | ||
| Alive | ||
| Unknown |
Oops, something went wrong.