-
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
35 changed files
with
2,715 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
module Evergreen.V105.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.V105.Data.Barter exposing (..) | ||
|
||
import Dict | ||
import Evergreen.V105.Data.Item | ||
import SeqDict | ||
|
||
|
||
type Message | ||
= BarterIsEmpty | ||
| PlayerOfferNotValuableEnough | ||
| YouGaveStuffForFree | ||
|
||
|
||
type TransferNPosition | ||
= PlayerKeptItem Evergreen.V105.Data.Item.Id | ||
| VendorKeptItem Evergreen.V105.Data.Item.Id | ||
| PlayerTradedItem Evergreen.V105.Data.Item.Id | ||
| VendorTradedItem Evergreen.V105.Data.Item.Id | ||
| PlayerKeptCaps | ||
| VendorKeptCaps | ||
| PlayerTradedCaps | ||
| VendorTradedCaps | ||
|
||
|
||
type alias State = | ||
{ playerItems : Dict.Dict Evergreen.V105.Data.Item.Id Int | ||
, vendorItems : Dict.Dict Evergreen.V105.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.V105.Data.Enemy exposing (..) | ||
|
||
|
||
type Type | ||
= 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,75 @@ | ||
module Evergreen.V105.Data.Fight exposing (..) | ||
|
||
import Evergreen.V105.Data.Fight.AttackStyle | ||
import Evergreen.V105.Data.Fight.OpponentType | ||
import Evergreen.V105.Data.Item | ||
import Evergreen.V105.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.V105.Data.Fight.AttackStyle.AttackStyle | ||
, remainingHp : Int | ||
, isCritical : Bool | ||
, apCost : Int | ||
} | ||
| Miss | ||
{ attackStyle : Evergreen.V105.Data.Fight.AttackStyle.AttackStyle | ||
, apCost : Int | ||
} | ||
| Heal | ||
{ itemKind : Evergreen.V105.Data.Item.Kind.Kind | ||
, healedHp : Int | ||
, newHp : Int | ||
} | ||
| SkipTurn | ||
| FailToDoAnything CommandRejectionReason | ||
|
||
|
||
type Result | ||
= AttackerWon | ||
{ xpGained : Int | ||
, capsGained : Int | ||
, itemsGained : List Evergreen.V105.Data.Item.Item | ||
} | ||
| TargetWon | ||
{ xpGained : Int | ||
, capsGained : Int | ||
, itemsGained : List Evergreen.V105.Data.Item.Item | ||
} | ||
| TargetAlreadyDead | ||
| BothDead | ||
| NobodyDead | ||
| NobodyDeadGivenUp | ||
|
||
|
||
type alias Info = | ||
{ attacker : Evergreen.V105.Data.Fight.OpponentType.OpponentType | ||
, target : Evergreen.V105.Data.Fight.OpponentType.OpponentType | ||
, log : List ( Who, Action ) | ||
, result : Result | ||
} |
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.V105.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.V105.Data.Fight.AttackStyle exposing (..) | ||
|
||
import Evergreen.V105.Data.Fight.AimedShot | ||
|
||
|
||
type AttackStyle | ||
= UnarmedUnaimed | ||
| UnarmedAimed Evergreen.V105.Data.Fight.AimedShot.AimedShot | ||
| MeleeUnaimed | ||
| MeleeAimed Evergreen.V105.Data.Fight.AimedShot.AimedShot | ||
| Throw | ||
| ShootSingleUnaimed | ||
| ShootSingleAimed Evergreen.V105.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,15 @@ | ||
module Evergreen.V105.Data.Fight.OpponentType exposing (..) | ||
|
||
import Evergreen.V105.Data.Enemy | ||
import Evergreen.V105.Data.Player.PlayerName | ||
|
||
|
||
type alias PlayerOpponent = | ||
{ name : Evergreen.V105.Data.Player.PlayerName.PlayerName | ||
, xp : Int | ||
} | ||
|
||
|
||
type OpponentType | ||
= Npc Evergreen.V105.Data.Enemy.Type | ||
| 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.V105.Data.FightStrategy exposing (..) | ||
|
||
import Evergreen.V105.Data.Fight.AttackStyle | ||
import Evergreen.V105.Data.Item.Kind | ||
|
||
|
||
type Value | ||
= MyHP | ||
| MyMaxHP | ||
| MyAP | ||
| MyItemCount Evergreen.V105.Data.Item.Kind.Kind | ||
| MyHealingItemCount | ||
| MyAmmoCount | ||
| ItemsUsed Evergreen.V105.Data.Item.Kind.Kind | ||
| HealingItemsUsed | ||
| AmmoUsed | ||
| ChanceToHit Evergreen.V105.Data.Fight.AttackStyle.AttackStyle | ||
| RangeNeeded Evergreen.V105.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.V105.Data.Fight.AttackStyle.AttackStyle | ||
| AttackRandomly | ||
| Heal Evergreen.V105.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.V105.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.V105.Data.HealthStatus exposing (..) | ||
|
||
|
||
type HealthStatus | ||
= ExactHp | ||
{ current : Int | ||
, max : Int | ||
} | ||
| Unhurt | ||
| SlightlyWounded | ||
| Wounded | ||
| SeverelyWounded | ||
| AlmostDead | ||
| Dead | ||
| Alive | ||
| Unknown |
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,19 @@ | ||
module Evergreen.V105.Data.Item exposing (..) | ||
|
||
import Evergreen.V105.Data.Item.Kind | ||
|
||
|
||
type alias Id = | ||
Int | ||
|
||
|
||
type alias Item = | ||
{ id : Id | ||
, kind : Evergreen.V105.Data.Item.Kind.Kind | ||
, count : Int | ||
} | ||
|
||
|
||
type alias UniqueKey = | ||
{ kind : Evergreen.V105.Data.Item.Kind.Kind | ||
} |
Oops, something went wrong.