Documentation ¶
Overview ¶
Package d2enum provides enumerations used throughout the OpenDiablo2 codebase.
Index ¶
- Constants
- func BaseLabelNumbers(idx int) int
- type AnimationFrame
- type AnimationFrameDirection
- type AnimationFrameEvent
- type ArmorClass
- type CompositeType
- type DifficultyType
- type DrawEffect
- type EncodingType
- type EquippedSlot
- type Filter
- type GameEvent
- type Hero
- type HeroStance
- type InventoryItemType
- type ItemAffixSubType
- type ItemAffixSuperType
- type ItemEventFuncID
- type ItemEventType
- type ItemQuality
- type Key
- type KeyMod
- type LevelGenerationType
- type MonUModConstIndex
- type MonsterAlignmentType
- type MonsterAnimationMode
- type MonsterCombatType
- type MouseButton
- type MouseButtonMod
- type NPCActionType
- type ObjectAnimationMode
- type ObjectType
- type OperatorType
- type PetIconType
- type PlayerAnimationMode
- type PlayersRelationships
- type Priority
- type RegionIdType
- type RegionLayerType
- type RenderType
- type SkillClass
- type TeleportFlag
- type TermCategory
- type TileType
- type WeaponClass
Constants ¶
const ( ArmorClassLite = "lit" ArmorClassMedium = "med" ArmorClassHeavy = "hvy" )
Armor classes
const ( RepairAll = iota CancelLabel CopyrightLabel AllRightsReservedLabel SinglePlayerLabel OtherMultiplayerLabel ExitGameLabel CreditsLabel CinematicsLabel ViewAllCinematicsLabel EpilogueLabel SelectCinematicLabel TCPIPGameLabel TCPIPOptionsLabel TCPIPHostGameLabel TCPIPJoinGameLabel TCPIPEnterHostIPLabel TCPIPYourIPLabel TipHostLabel TipJoinLabel IPNotFoundLabel CharNameLabel HardCoreLabel SelectHeroClassLabel AmazonDescr NecromancerDescr BarbarianDescr SorceressDescr PaladinDescr HellLabel NightmareLabel NormalLabel SelectDifficultyLabel DelCharConfLabel OpenLabel YesLabel NoLabel ExitLabel OKLabel )
there are labels for "numeric labels (see AssetManager.TranslateString)
const ( // OpDefault just adds the stat to the unit directly OpDefault = OperatorType(iota) // Op1 adds opstat.base * statvalue / 100 to the opstat. Op1 // Op2 adds (statvalue * basevalue) / (2 ^ param) to the opstat // this does not work properly with any stat other then level because of the // way this is updated, it is only refreshed when you re-equip the item, // your character is saved or you level up, similar to passive skills, just // because it looks like it works in the item description // does not mean it does, the game just recalculates the information in the // description every frame, while the values remain unchanged serverside. Op2 // Op3 is a percentage based version of op #2 // look at op #2 for information about the formula behind it, just // remember the stat is increased by a percentage rather then by adding // an integer. Op3 // Op4 works the same way op #2 works, however the stat bonus is // added to the item and not to the player (so that +defense per level // properly adds the defense to the armor and not to the character // directly!) Op4 // Op5 works like op #4 but is percentage based, it is used for percentage // based increase of stats that are found on the item itself, and not stats // that are found on the character. Op5 // Op6 works like for op #7, however this adds a plain bonus to the stat, and just // like #7 it also doesn't work so I won't bother to explain the arithmetic // behind it either. Op6 // Op7 is used to increase a stat based on the current daytime of the game // world by a percentage, there is no need to explain the arithmetics // behind it because frankly enough it just doesn't work serverside, it // only updates clientside so this op is essentially useless. Op7 // Op8 hardcoded to work only with maxmana, this will apply the proper amount // of mana to your character based on CharStats.txt for the amount of energy // the stat added (doesn't work for non characters) Op8 // Op9 hardcoded to work only with maxhp and maxstamina, this will apply the // proper amount of maxhp and maxstamina to your character based on // CharStats.txt for the amount of vitality the stat added (doesn't work // for non characters) Op9 // Op10 doesn't do anything, this has no switch case in the op function. Op10 // Op11 adds opstat.base * statvalue / 100 similar to 1 and 13, the code just // does a few more checks Op11 // Op12 doesn't do anything, this has no switch case in the op function. Op12 // Op13 adds opstat.base * statvalue / 100 to the value of opstat, this is // useable only on items it will not apply the bonus to other unit types // (this is why it is used for +% durability, +% level requirement, // +% damage, +% defense ). Op13 )
const ( PartyButtonListeningFrame = iota * 4 PartyButtonRelationshipsFrame PartyButtonSeeingFrame PartyButtonCorpsLootingFrame PartyButtonNextButtonFrame = 2 )
Frames of party Buttons
const ( // NormalActQuestsNumber is number of quests in standard act NormalActQuestsNumber = 6 // HalfQuestsNumber is number of quests in act 4 HalfQuestsNumber = 3 )
const ( // Act1 is act 1 in game Act1 = iota + 1 // Act2 is act 2 in game Act2 // Act3 is act 3 in game Act3 // Act4 is act 4 in game Act4 // Act5 is act 4 in game Act5 )
const ( QuestStatusCompleted = iota - 2 // quest completed QuestStatusCompleting // quest completed (need to play animation) QuestStatusNotStarted // quest not started yet QuestStatusInProgress // quest is in progress )
I think, It should looks like that:
each quest has its own position in questStatus map which should come from save file. quests status values: - -2 - done - -1 - done, need to play animation - 0 - not started yet - and after that we have "in progress status" so for status (from 1 to n) we have appropriate quest descriptions and we'll have appropriate actions
const ( // QuestNone describes "no selected quest" status QuestNone = iota // Quest1 describes quest field 1 Quest1 // Quest2 describes quest field 2 Quest2 // Quest3 describes quest field 3 Quest3 // Quest4 describes quest field 4 Quest4 // Quest5 describes quest field 5 Quest5 // Quest6 describes quest field 6 Quest6 )
const ( SkillClassTokenGeneric = "" SkillClassTokenBarbarian = "bar" SkillClassTokenNecromancer = "nec" SkillClassTokenPaladin = "pal" SkillClassTokenAssassin = "ass" SkillClassTokenSorceress = "sor" SkillClassTokenAmazon = "ama" SkillClassTokenDruid = "dru" )
Skill class tokens
const ActsNumber = 5
ActsNumber is number of acts in game
const (
MaxPlayersInGame = 8
)
determinates max players number for one game
const (
PlayersHostileLevel = 9
)
determinates a level, which both players should reach to go hostile
Variables ¶
This section is empty.
Functions ¶
func BaseLabelNumbers ¶
BaseLabelNumbers returns base label value (#n in english string table table)
Types ¶
type AnimationFrame ¶
type AnimationFrame int
AnimationFrame represents a single frame of animation.
const ( AnimationFrameNoEvent AnimationFrame = iota AnimationFrameAttack AnimationFrameMissile AnimationFrameSound AnimationFrameSkill )
AnimationFrame types
type AnimationFrameDirection ¶
type AnimationFrameDirection int
AnimationFrameDirection enumerates animation frame directions used in d2datadict.MonsterSequenceFrame
const ( SouthWest AnimationFrameDirection = iota NorthWest NorthEast SouthEast South West North East )
Animation frame directions
type AnimationFrameEvent ¶
type AnimationFrameEvent int
AnimationFrameEvent enumerates events used in d2datadict.MonsterSequenceFrame
const ( NoEvent AnimationFrameEvent = iota MeleeAttack MissileAttack PlaySound LaunchSpell )
Animation frame events
type ArmorClass ¶
type ArmorClass string
ArmorClass is a 3-character token for the armor. It's used for speed calculations.
type CompositeType ¶
type CompositeType int
CompositeType represents a composite type
const ( CompositeTypeHead CompositeType = iota // HD CompositeTypeTorso // TR CompositeTypeLegs // LG CompositeTypeRightArm // RA CompositeTypeLeftArm // LA CompositeTypeRightHand // RH CompositeTypeLeftHand // LH CompositeTypeShield // SH CompositeTypeSpecial1 // S1 CompositeTypeSpecial2 // S2 CompositeTypeSpecial3 // S3 CompositeTypeSpecial4 // S4 CompositeTypeSpecial5 // S5 CompositeTypeSpecial6 // S6 CompositeTypeSpecial7 // S7 CompositeTypeSpecial8 // S8 CompositeTypeMax )
Composite types
func (CompositeType) String ¶
func (i CompositeType) String() string
type DifficultyType ¶
type DifficultyType int
DifficultyType is an enum for the possible difficulties
const ( // DifficultyNormal is the normal difficulty DifficultyNormal DifficultyType = iota // DifficultyNightmare is the nightmare difficulty DifficultyNightmare // DifficultyHell is the hell difficulty DifficultyHell )
type DrawEffect ¶
type DrawEffect int
DrawEffect is a draw effect
const ( // DrawEffectPctTransparency25 is a draw effect that implements the following function: // GL_MODULATE; GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA 25 % transparency (colormaps 49-304 in a .pl2) DrawEffectPctTransparency25 DrawEffect = iota // DrawEffectPctTransparency50 is a draw effect that implements the following function: // GL_MODULATE; GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA 50 % transparency (colormaps 305-560 in a .pl2) DrawEffectPctTransparency50 // DrawEffectPctTransparency75 is a draw effect that implements the following function: // GL_MODULATE; GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA 75 % transparency (colormaps 561-816 in a .pl2) DrawEffectPctTransparency75 // DrawEffectModulate is a draw effect that implements the following function: // GL_MODULATE; GL_SRC_ALPHA, GL_DST_ALPHA (colormaps 817-1072 in a .pl2) DrawEffectModulate // DrawEffectBurn is a draw effect that implements the following function: // GL_MODULATE; GL_DST_COLOR, GL_ONE_MINUS_SRC_ALPHA (colormaps 1073-1328 in a .pl2) DrawEffectBurn // DrawEffectNormal is a draw effect that implements the following function: // GL_MODULATE; GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA (colormaps 1457-1712 in a .pl2) DrawEffectNormal // DrawEffectMod2XTrans is a draw effect that implements the following function: // GL_MODULATE; GL_SRC_COLOR, GL_DST_ALPHA (colormaps 1457-1712 in a .pl2) DrawEffectMod2XTrans // DrawEffectMod2X is a draw effect that implements the following function: // GL_COMBINE_ARB; GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA (colormaps 1457-1712 in a .pl2) DrawEffectMod2X // no effect DrawEffectNone )
Names courtesy of Necrolis
func (DrawEffect) String ¶
func (d DrawEffect) String() string
func (DrawEffect) Transparent ¶
func (d DrawEffect) Transparent() bool
Transparent returns true if there is no effect, false otherwise
type EncodingType ¶
type EncodingType int
EncodingType represents a encoding type
const (
EncodeDefault EncodingType = iota
)
Encoding types
type EquippedSlot ¶
type EquippedSlot int
EquippedSlot represents the type of equipment slot
const ( EquippedSlotNone EquippedSlot = iota EquippedSlotHead EquippedSlotTorso EquippedSlotLegs EquippedSlotRightArm EquippedSlotLeftArm EquippedSlotLeftHand EquippedSlotRightHand EquippedSlotNeck EquippedSlotBelt EquippedSlotGloves )
Equipped slot ID's
type Filter ¶
type Filter int
Filter represents the type of texture filter to be used when an image is magnified or minified.
type GameEvent ¶
type GameEvent int
GameEvent represents an envent in the game engine
const ( // ToggleGameMenu will display the game menu ToggleGameMenu GameEvent = iota + 1 // panel toggles ToggleCharacterPanel ToggleInventoryPanel TogglePartyPanel ToggleSkillTreePanel ToggleHirelingPanel ToggleQuestLog ToggleHelpScreen ToggleChatOverlay ToggleMessageLog ToggleRightSkillSelector // these two are for left/right speed-skill panel toggles ToggleLeftSkillSelector ToggleAutomap CenterAutomap // recenters the automap when opened FadeAutomap // reduces the brightness of the map (not the players/npcs) TogglePartyOnAutomap // toggles the display of the party members on the automap ToggleNamesOnAutomap // toggles the display of party members names and npcs on the automap ToggleMiniMap // there can be 16 hotkeys, each hotkey can have a skill assigned UseSkill1 UseSkill2 UseSkill3 UseSkill4 UseSkill5 UseSkill6 UseSkill7 UseSkill8 UseSkill9 UseSkill10 UseSkill11 UseSkill12 UseSkill13 UseSkill14 UseSkill15 UseSkill16 // switching between prev/next skill SelectPreviousSkill SelectNextSkill // ToggleBelts toggles the display of the different level for // the currently equipped belt ToggleBelts UseBeltSlot1 UseBeltSlot2 UseBeltSlot3 UseBeltSlot4 SwapWeapons ToggleChatBox ToggleRunWalk SayHelp SayFollowMe SayThisIsForYou SayThanks SaySorry SayBye SayNowYouDie SayRetreat // these events are fired while a player holds the corresponding key HoldRun HoldStandStill HoldShowGroundItems HoldShowPortraits TakeScreenShot ClearScreen // closes all active menus/panels ClearMessages )
Game events
type Hero ¶
type Hero int
Hero is used for different types of hero's
const ( HeroNone Hero = iota // HeroBarbarian // Barbarian HeroNecromancer // Necromancer HeroPaladin // Paladin HeroAssassin // Assassin HeroSorceress // Sorceress HeroAmazon // Amazon HeroDruid // Druid )
Heroes
func HeroFromString ¶
HeroFromString returns the Hero enum corresponding to s.
type HeroStance ¶
type HeroStance int
HeroStance used to render hero stance
const ( HeroStanceIdle HeroStance = iota HeroStanceIdleSelected HeroStanceApproaching HeroStanceSelected HeroStanceRetreating )
HeroStance types
type InventoryItemType ¶
type InventoryItemType int
InventoryItemType represents a inventory item type
const ( InventoryItemTypeItem InventoryItemType = iota InventoryItemTypeWeapon InventoryItemTypeArmor )
Inventry item types
type ItemAffixSubType ¶
type ItemAffixSubType int
ItemAffixSubType represents a item affix sub type
const ( ItemAffixCommon ItemAffixSubType = iota ItemAffixMagic )
Sub types
type ItemAffixSuperType ¶
type ItemAffixSuperType int
ItemAffixSuperType represents a item affix super type
const ( ItemAffixPrefix ItemAffixSuperType = iota ItemAffixSuffix )
Super types
type ItemEventFuncID ¶
type ItemEventFuncID int
ItemEventFuncID represents a item event function
const ( // shoots a missile at the owner of a missile that has just hit you // (Chilling Armor uses this) ReflectMissile ItemEventFuncID = iota // freezes the attacker for a set duration the attacker // (Frozen Armor uses this) FreezeAttacker // does cold damage to and chills the attacker (Shiver Armor uses this) FreezeChillAttacker // % of damage taken is done to the attacker // (Iron Maiden, thorns uses a hardcoded stat) ReflectPercentDamage // % of damage done added to life, bypassing the targets resistance // (used by Life Tap) DamageDealtToHealth // attacker takes physical damage of # AttackerTakesPhysical // knocks the target back Knockback // induces fear in the target making it run away InduceFear // applies Dim Vision to the target (it casts the actual curse on the // monster) BlindTarget // attacker takes lightning damage of # AttackerTakesLightning // attacker takes fire damage of # AttackerTakesFire // attacker takes cold damage of # AttackerTakesCold // % damage taken is added to mana DamageTakenToMana // freezes the target FreezeTarget // causes the target to bleed and lose life (negative life regen) OpenWounds // crushing blow against the target CrushingBlow // mana after killing a monster ManaOnKillMonster // life after killing a demon LifeOnKillDemon // slows the target SlowTarget // casts a skill against the defender CastSkillAgainstDefender // casts a skill against the attacker CastSkillAgainstAttacker // absorbs physical damage taken (used by Bone Armor) AbsorbPhysical // transfers damage done from the summon to the owner (used by Blood Golem) TakeSummonDamage // used by Energy Shield to absorb damage and shift it from life to mana ManaAbsorbsDamage // absorbs elemental damage taken (used by Cyclone Armor) AbsorbElementalDamage // transfers damage taken from the summon to the owner (used by Blood Golem) TakeSummonDamage2 // used to slow the attacker if he hits a unit that has the slow target stat // (used by Clay Golem) TargetSlowsTarget // life after killing a monster LifeOnKillMonster // destroys the corpse of a killed monster (rest in peace effect) RestInPeace // cast a skill when the event occurs, without a target CastSkillWithoutTarget // reanimate the target as the specified monster ReanimateTargetAsMonster )
Item event functions
type ItemEventType ¶
type ItemEventType int
ItemEventType used in ItemStatCost
const ( ItemEventNone ItemEventType = iota ItemEventHitByMissile // hit By a Missile ItemEventDamagedInMelee // Damaged in Melee ItemEventDamagedByMissile // Damaged By Missile ItemEventAttackedInMelee // melee Attack atttempt ItemEventDoActive // do active state skill ItemEventDoMeleeDamage // do damage in melee ItemEventDoMissileDamage // do missile damage ItemEventDoMeleeAttack // do melee attack ItemEventDoMissileAttack // do missile attack ItemEventKill // killed something ItemEventKilled // killed By something ItemEventAbsorbDamage // dealt damage ItemEventLevelUp // gain a level )
Item event types
func GetItemEventType ¶
func GetItemEventType(s string) ItemEventType
GetItemEventType returns the ItemEventType from string, expects lowercase input
type ItemQuality ¶
type ItemQuality int
ItemQuality is used for enumerating item quality values
const ( LowQuality ItemQuality = iota + 1 Normal Superior Magic Set Rare Unique Crafted Tempered )
Item qualities
type Key ¶
type Key int
Key represents button on a traditional keyboard.
const ( Key0 Key = iota Key1 Key2 Key3 Key4 Key5 Key6 Key7 Key8 Key9 KeyA KeyB KeyC KeyD KeyE KeyF KeyG KeyH KeyI KeyJ KeyK KeyL KeyM KeyN KeyO KeyP KeyQ KeyR KeyS KeyT KeyU KeyV KeyW KeyX KeyY KeyZ KeyApostrophe KeyBackslash KeyBackspace KeyCapsLock KeyComma KeyDelete KeyDown KeyEnd KeyEnter KeyEqual KeyEscape KeyF1 KeyF2 KeyF3 KeyF4 KeyF5 KeyF6 KeyF7 KeyF8 KeyF9 KeyF10 KeyF11 KeyF12 KeyGraveAccent KeyHome KeyInsert KeyKP0 KeyKP1 KeyKP2 KeyKP3 KeyKP4 KeyKP5 KeyKP6 KeyKP7 KeyKP8 KeyKP9 KeyKPAdd KeyKPDecimal KeyKPDivide KeyKPEnter KeyKPEqual KeyKPMultiply KeyKPSubtract KeyLeft KeyLeftBracket KeyMenu KeyMinus KeyNumLock KeyPageDown KeyPageUp KeyPause KeyPeriod KeyPrintScreen KeyRight KeyRightBracket KeyScrollLock KeySemicolon KeySlash KeySpace KeyTab KeyUp KeyAlt KeyControl KeyShift KeyTilde KeyMouse3 KeyMouse4 KeyMouse5 KeyMouseWheelUp KeyMouseWheelDown KeyMin = Key0 KeyMax = KeyMouseWheelDown )
Input keys
type KeyMod ¶
type KeyMod int
KeyMod represents a "modified" key action. This could mean, for example, ctrl-S
type LevelGenerationType ¶
type LevelGenerationType int
LevelGenerationType Setting for Level Generation: You have 3 possibilities here: 1 Random Maze 2 Preset Area 3 Wilderness level
const ( LevelTypeRandomMaze LevelGenerationType = iota LevelTypePreset LevelTypeWilderness )
Level generation types
type MonUModConstIndex ¶
type MonUModConstIndex int
MonUModConstIndex is used as an index into d2datadict.MonsterUniqueModifierConstants
const ( ChampionChance MonUModConstIndex = iota MinionHPBonus MinionHPBonusNightmare MinionHPBonusHell ChampionHPBonus ChampionHPBonusNightmare ChampionHPBonusHell UniqueHPBonus UniqueHPBonusNightmare UniqueHPBonusHell ChampionAttackRatingBonus ChampionDamageBonus StrongMinionAttackRatingBonus StrongMinionDamageBonus MinionElementalDamageMinBonus MinionElementalDamageMinBonusNightmare MinionElementalDamageMinBonusHell MinionElementalDamageMaxBonus MinionElementalDamageMaxBonusNightmare MinionElementalDamageMaxBonusHell ChampionElementalDamageMinBonus ChampionElementalDamageMinBonusNightmare ChampionElementalDamageMinBonusHell ChampionElementalDamageMaxBonus ChampionElementalDamageMaxBonusNightmare ChampionElementalDamageMaxBonusHell UniqueElementalDamageMinBonus UniqueElementalDamageMinBonusNightmare UniqueElementalDamageMinBonusHell UniqueElementalDamageMaxBonus UniqueElementalDamageMaxBonusNightmare UniqueElementalDamageMaxBonusHell )
Unique monster modifier constants
type MonsterAlignmentType ¶
type MonsterAlignmentType int
MonsterAlignmentType determines the hostility of the monster towards players
const ( // MonsterEnemy flag will make monsters hostile towards players MonsterEnemy MonsterAlignmentType = iota // MonsterFriend will make monsters friendly towards players // this is likely used by NPC's and summons MonsterFriend // MonsterNeutral will make monsters not care about players or monsters // this flag is used for `critter` type monsters MonsterNeutral )
type MonsterAnimationMode ¶
type MonsterAnimationMode int
MonsterAnimationMode represents monster animation modes
const ( MonsterAnimationModeDeath MonsterAnimationMode = iota // DT MonsterAnimationModeNeutral // NU MonsterAnimationModeWalk // WL MonsterAnimationModeGetHit // GH MonsterAnimationModeAttack1 // A1 MonsterAnimationModeAttack2 // A2 MonsterAnimationModeBlock // BL MonsterAnimationModeCast // SC MonsterAnimationModeSkill1 // S1 MonsterAnimationModeSkill2 // S2 MonsterAnimationModeSkill3 // S3 MonsterAnimationModeSkill4 // S4 MonsterAnimationModeDead // DD MonsterAnimationModeKnockback // GH MonsterAnimationModeSequence // xx MonsterAnimationModeRun // RN )
Monster animation modes
func (MonsterAnimationMode) String ¶
func (i MonsterAnimationMode) String() string
type MonsterCombatType ¶
type MonsterCombatType int
MonsterCombatType is used for setting the monster as melee or ranged
const ( // MonsterMelee is a flag that sets the monster as melee-only MonsterMelee MonsterCombatType = iota // MonsterRanged is a flag that sets the monster as ranged-only MonsterRanged )
type MouseButton ¶
type MouseButton int
MouseButton represents a traditional 3-button mouse
const ( // MouseButtonLeft is the left mouse button MouseButtonLeft MouseButton = iota // MouseButtonMiddle is the middle mouse button MouseButtonMiddle // MouseButtonRight is the right mouse button MouseButtonRight // MouseButtonMin is the lowest MouseButton MouseButtonMin = MouseButtonLeft // MouseButtonMax is the highest MouseButton MouseButtonMax = MouseButtonRight )
type MouseButtonMod ¶
type MouseButtonMod int
MouseButtonMod represents a "modified" mouse button action. This could mean, for example, ctrl-mouse_left
const ( // MouseButtonModLeft is a modified left mouse button MouseButtonModLeft MouseButtonMod = 1 << iota // MouseButtonModMiddle is a modified middle mouse button MouseButtonModMiddle // MouseButtonModRight is a modified right mouse button MouseButtonModRight )
type NPCActionType ¶
type NPCActionType int
NPCActionType determines composite mode animations for NPC's as they move around
const ( NPCActionInvalid NPCActionType = iota NPCAction1 NPCAction2 NPCAction3 NPCActionSkill1 )
NPCAction types https://github.com/OpenDiablo2/OpenDiablo2/issues/811
type ObjectAnimationMode ¶
type ObjectAnimationMode int
ObjectAnimationMode represents object animation modes
const ( ObjectAnimationModeNeutral ObjectAnimationMode = iota // NU ObjectAnimationModeOperating // OP ObjectAnimationModeOpened // ON ObjectAnimationModeSpecial1 // S1 ObjectAnimationModeSpecial2 // S2 ObjectAnimationModeSpecial3 // S3 ObjectAnimationModeSpecial4 // S4 ObjectAnimationModeSpecial5 // S5 )
Object animation modes
func ObjectAnimationModeFromString ¶
func ObjectAnimationModeFromString(s string) ObjectAnimationMode
ObjectAnimationModeFromString returns the ObjectAnimationMode enum corresponding to s.
func (ObjectAnimationMode) String ¶
func (i ObjectAnimationMode) String() string
type ObjectType ¶
type ObjectType int
ObjectType is the type of an object
const ( ObjectTypePlayer ObjectType = iota ObjectTypeCharacter ObjectTypeItem )
Object types
type OperatorType ¶
type OperatorType int // for dynamic properties
OperatorType is used for calculating dynamic property values
type PetIconType ¶
type PetIconType int
PetIconType determines the pet icon type
const ( NoIcon PetIconType = iota ShowIconOnly ShowIconAndQuantity // Quantity, such as the number of skeletons ShowIconOnly2 )
Pet icon types The information has been gathered from [https:// d2mods.info/forum/kb/viewarticle?a=355]
type PlayerAnimationMode ¶
type PlayerAnimationMode int
PlayerAnimationMode represents player animation modes
const ( PlayerAnimationModeDeath PlayerAnimationMode = iota // DT PlayerAnimationModeNeutral // NU PlayerAnimationModeWalk // WL PlayerAnimationModeRun // RN PlayerAnimationModeGetHit // GH PlayerAnimationModeTownNeutral // TN PlayerAnimationModeTownWalk // TW PlayerAnimationModeAttack1 // A1 PlayerAnimationModeAttack2 // A2 PlayerAnimationModeBlock // BL PlayerAnimationModeCast // SC PlayerAnimationModeThrow // TH PlayerAnimationModeKick // KK PlayerAnimationModeSkill1 // S1 PlayerAnimationModeSkill2 // S2 PlayerAnimationModeSkill3 // S3 PlayerAnimationModeSkill4 // S4 PlayerAnimationModeDead // DD PlayerAnimationModeSequence // GH PlayerAnimationModeKnockBack // GH PlayerAnimationModeNone // "" - aura skills, e.g. Paladin's Concentration Aura )
Player animation modes
func (PlayerAnimationMode) String ¶
func (i PlayerAnimationMode) String() string
type PlayersRelationships ¶
type PlayersRelationships int
PlayersRelationships represents players relationships
const ( PlayerRelationNeutral PlayersRelationships = iota PlayerRelationFriend PlayerRelationEnemy )
Players relationships
type RegionIdType ¶
type RegionIdType int //nolint:golint,stylecheck // many changed needed when changing to ID
RegionIdType represents a region ID
const ( RegionNone RegionIdType = iota RegionAct1Town RegionAct1Wilderness RegionAct1Cave RegionAct1Crypt RegionAct1Monestary RegionAct1Courtyard RegionAct1Barracks RegionAct1Jail RegionAct1Cathedral RegionAct1Catacombs RegionAct1Tristram RegionAct2Town RegionAct2Sewer RegionAct2Harem RegionAct2Basement RegionAct2Desert RegionAct2Tomb RegionAct2Lair RegionAct2Arcane RegionAct3Town RegionAct3Jungle RegionAct3Kurast RegionAct3Spider RegionAct3Dungeon RegionAct3Sewer RegionAct4Town RegionAct4Mesa RegionAct4Lava RegonAct5Town RegionAct5Siege RegionAct5Barricade RegionAct5Temple RegionAct5IceCaves RegionAct5Baal RegionAct5Lava )
Regions
type RegionLayerType ¶
type RegionLayerType int
RegionLayerType represents a region layer
const ( RegionLayerTypeFloors RegionLayerType = iota RegionLayerTypeWalls RegionLayerTypeShadows )
Region layer types
type RenderType ¶
type RenderType int
RenderType defines the type of rendering engine to use
const (
Ebiten RenderType = iota + 1
)
Render types
type SkillClass ¶
type SkillClass int
SkillClass represents the skills for a character class
const ( SkillClassGeneric SkillClass = iota SkillClassBarbarian SkillClassNecromancer SkillClassPaladin SkillClassAssassin SkillClassSorceress SkillClassAmazon SkillClassDruid )
Skill classes
func (*SkillClass) FromToken ¶
func (sc *SkillClass) FromToken(classToken string) SkillClass
FromToken returns the enum which corresponds to the given class token
func (SkillClass) GetToken ¶
func (sc SkillClass) GetToken() string
GetToken returns a string token for the enum
type TeleportFlag ¶
type TeleportFlag int
TeleportFlag Controls if teleport is allowed in that level. 0 = Teleport not allowed 1 = Teleport allowed 2 = Teleport allowed, but not able to use teleport throu walls/objects (maybe for objects)
const ( TeleportDisabled TeleportFlag = iota TeleportEnabled TeleportEnabledLimited )
Teleport flag types
type TermCategory ¶
type TermCategory int
TermCategory applies styles to the lines in the Terminal
const ( TermCategoryNone TermCategory = iota TermCategoryInfo TermCategoryWarning TermCategoryError )
Terminal Category types
type TileType ¶
type TileType byte
TileType represents a tile type
const ( TileFloor TileType = iota TileLeftWall TileRightWall TileRightPartOfNorthCornerWall TileLeftPartOfNorthCornerWall TileLeftEndWall TileRightEndWall TileSouthCornerWall TileLeftWallWithDoor TileRightWallWithDoor TileSpecialTile1 TileSpecialTile2 TilePillarsColumnsAndStandaloneObjects TileShadow TileTree TileRoof TileLowerWallsEquivalentToLeftWall TileLowerWallsEquivalentToRightWall TileLowerWallsEquivalentToRightLeftNorthCornerWall TileLowerWallsEquivalentToSouthCornerwall )
Tile types
type WeaponClass ¶
type WeaponClass int
WeaponClass represents a weapon class
const ( WeaponClassNone WeaponClass = iota // WeaponClassHandToHand // hth WeaponClassBow // bow WeaponClassOneHandSwing // 1hs WeaponClassOneHandThrust // 1ht WeaponClassStaff // stf WeaponClassTwoHandSwing // 2hs WeaponClassTwoHandThrust // 2ht WeaponClassCrossbow // xbw WeaponClassLeftJabRightSwing // 1js WeaponClassLeftJabRightThrust // 1jt WeaponClassLeftSwingRightSwing // 1ss WeaponClassLeftSwingRightThrust // 1st WeaponClassOneHandToHand // ht1 WeaponClassTwoHandToHand // ht2 )
Weapon classes
func WeaponClassFromString ¶
func WeaponClassFromString(s string) WeaponClass
WeaponClassFromString returns the WeaponClass enum corresponding to s.
func (WeaponClass) Name ¶
func (w WeaponClass) Name() string
Name returns a full name of weapon class
func (WeaponClass) String ¶
func (i WeaponClass) String() string
Source Files ¶
- animation_frame.go
- animation_frame_direction.go
- animation_frame_event.go
- composite_type.go
- composite_type_string.go
- difficulty.go
- doc.go
- draw_effect.go
- encoding_type.go
- equipped_slot.go
- filter.go
- game_event.go
- hero.go
- hero_stance.go
- hero_string.go
- hero_string2enum.go
- input_button.go
- input_key.go
- input_priority.go
- inventory_item_type.go
- item_affix_type.go
- item_armor_class.go
- item_event_functions.go
- item_events.go
- item_quality.go
- level_generation_types.go
- level_teleport_flags.go
- monster_alignment_type.go
- monster_animation_mode.go
- monster_animation_mode_string.go
- monster_combat_type.go
- monumod_const_index.go
- npc_action_type.go
- numeric_labels.go
- object_animation_mode.go
- object_animation_mode_string.go
- object_animation_mode_string2enum.go
- object_type.go
- operator_type.go
- party_buttons.go
- pet_icon_type.go
- player_animation_mode.go
- player_animation_mode_string.go
- players_relationships.go
- quests.go
- region_id.go
- region_layer.go
- render_type.go
- skill_class.go
- terminal_category.go
- tile.go
- weapon_class.go
- weapon_class_string.go
- weapon_class_string2enum.go