| 100 | } |
| 101 | |
| 102 | func New() *Character { |
| 103 | return &Character{ |
| 104 | //Name: defaultName, |
| 105 | Adjectives: []string{}, |
| 106 | RoomId: StartingRoomId, |
| 107 | Zone: startingZone, |
| 108 | RaceId: startingRace, |
| 109 | Stats: stats.Statistics{ |
| 110 | Strength: stats.StatInfo{Base: 1}, |
| 111 | Speed: stats.StatInfo{Base: 1}, |
| 112 | Smarts: stats.StatInfo{Base: 1}, |
| 113 | Vitality: stats.StatInfo{Base: 1}, |
| 114 | Mysticism: stats.StatInfo{Base: 1}, |
| 115 | Perception: stats.StatInfo{Base: 1}, |
| 116 | }, |
| 117 | Level: 1, |
| 118 | Experience: 1, |
| 119 | TrainingPoints: 0, |
| 120 | StatPoints: 0, |
| 121 | TNLScale: 1.0, |
| 122 | Health: startingHealth, |
| 123 | HealthMax: stats.StatInfo{Base: 1}, |
| 124 | Mana: startingMana, |
| 125 | ManaMax: stats.StatInfo{Base: 1}, |
| 126 | Skills: make(map[string]int), |
| 127 | Gold: 25, |
| 128 | Bank: 100, |
| 129 | SpellBook: make(map[string]int), |
| 130 | CharmedMobs: []int{}, |
| 131 | Items: []items.Item{}, |
| 132 | Buffs: buffs.New(), |
| 133 | Equipment: Worn{}, |
| 134 | MiscData: make(map[string]any), |
| 135 | roomHistory: make([]int, 0, 10), |
| 136 | KeyRing: make(map[string]string), |
| 137 | Created: time.Now(), |
| 138 | PlayerDamage: map[int]int{}, |
| 139 | Timers: map[string]gametime.RoundTimer{}, |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | // returns description unless description is a hash |
| 144 | // which points to another description location. |