Skip to content

Commit

Permalink
add new effects (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
morphy2k committed Jun 27, 2020
1 parent 37f04a2 commit 5c639ac
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 15 deletions.
2 changes: 1 addition & 1 deletion model/item/kind_medical.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type Medical struct {

Type string `json:"type" bson:"type"`
Resources int64 `json:"resources" bson:"resources"`
ResourceRate int64 `json:"resourceRate" bson:"resourceRate"`
ResourceRate int64 `json:"resourceRate" bson:"resourceRate"` // deprecated
UseTime float64 `json:"useTime" bson:"useTime"`
Effects Effects `json:"effects" bson:"effects"`
}
40 changes: 26 additions & 14 deletions model/item/prop_effects.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,39 @@ package item

// Effects holds all effect types
type Effects struct {
Energy *Effect `json:"energy,omitempty" bson:"energy,omitempty"`
Hydration *Effect `json:"hydration,omitempty" bson:"hydration,omitempty"`
Bloodloss *Effect `json:"bloodloss,omitempty" bson:"bloodloss,omitempty"`
Fracture *Effect `json:"fracture,omitempty" bson:"fracture,omitempty"`
Contusion *Effect `json:"contusion,omitempty" bson:"contusion,omitempty"`
Pain *Effect `json:"pain,omitempty" bson:"pain,omitempty"`
Toxication *Effect `json:"toxication,omitempty" bson:"toxication,omitempty"`
RadiationExposure *Effect `json:"radExposure,omitempty" bson:"radExposure,omitempty"`
Mobility *Effect `json:"mobility,omitempty" bson:"mobility,omitempty"`
Recoil *Effect `json:"recoil,omitempty" bson:"recoil,omitempty"`
ReloadSpeed *Effect `json:"reloadSpeed,omitempty" bson:"reloadSpeed,omitempty"`
LootSpeed *Effect `json:"lootSpeed,omitempty" bson:"lootSpeed,omitempty"`
UnlockSpeed *Effect `json:"unlockSpeed,omitempty" bson:"unlockSpeed,omitempty"`
DestroyedPart *Effect `json:"destroyedPart,omitempty" bson:"destroyedPart,omitempty"`
Energy *Effect `json:"energy,omitempty" bson:"energy,omitempty"`
EnergyRate *Effect `json:"energyRate,omitempty" bson:"energyRate,omitempty"`
Hydration *Effect `json:"hydration,omitempty" bson:"hydration,omitempty"`
HydrationRate *Effect `json:"hydrationRate,omitempty" bson:"hydrationRate,omitempty"`
Stamina *Effect `json:"stamina,omitempty" bson:"stamina,omitempty"`
StaminaRate *Effect `json:"staminaRate,omitempty" bson:"staminaRate,omitempty"`
Health *Effect `json:"health,omitempty" bson:"health,omitempty"`
HealthRate *Effect `json:"healthRate,omitempty" bson:"healthRate,omitempty"`
Bloodloss *Effect `json:"bloodloss,omitempty" bson:"bloodloss,omitempty"`
Fracture *Effect `json:"fracture,omitempty" bson:"fracture,omitempty"`
Contusion *Effect `json:"contusion,omitempty" bson:"contusion,omitempty"`
Pain *Effect `json:"pain,omitempty" bson:"pain,omitempty"`
TunnelVision *Effect `json:"tunnelVision,omitempty" bson:"tunnelVision,omitempty"`
Tremor *Effect `json:"tremor,omitempty" bson:"tremor,omitempty"`
Toxication *Effect `json:"toxication,omitempty" bson:"toxication,omitempty"`
RadiationExposure *Effect `json:"radExposure,omitempty" bson:"radExposure,omitempty"`
Mobility *Effect `json:"mobility,omitempty" bson:"mobility,omitempty"`
Recoil *Effect `json:"recoil,omitempty" bson:"recoil,omitempty"`
ReloadSpeed *Effect `json:"reloadSpeed,omitempty" bson:"reloadSpeed,omitempty"`
LootSpeed *Effect `json:"lootSpeed,omitempty" bson:"lootSpeed,omitempty"`
UnlockSpeed *Effect `json:"unlockSpeed,omitempty" bson:"unlockSpeed,omitempty"`
DestroyedPart *Effect `json:"destroyedPart,omitempty" bson:"destroyedPart,omitempty"`
Skill []Effect `json:"skill,omitempty" bson:"skill,omitempty"`
}

// Effect represents the properties of an effect
type Effect struct {
Name string `json:"name,omitempty" bson:"name,omitempty"`
ResourceCosts int64 `json:"resourceCosts" bson:"resourceCosts"`
FadeIn float64 `json:"fadeIn" bson:"fadeIn"`
FadeOut float64 `json:"fadeOut" bson:"fadeOut"`
Chance float64 `json:"chance" bson:"chance"`
Delay float64 `json:"delay" bson:"delay"`
Duration float64 `json:"duration" bson:"duration"`
Value float64 `json:"value" bson:"value"`
IsPercent bool `json:"isPercent" bson:"isPercent"`
Expand Down

0 comments on commit 5c639ac

Please sign in to comment.