()
| 330 | } |
| 331 | |
| 332 | func (p *Pet) GetCurrentAbilityDisplay() *AbilityDisplay { |
| 333 | ab := p.GetCurrentAbility() |
| 334 | if ab == nil { |
| 335 | return nil |
| 336 | } |
| 337 | d := &AbilityDisplay{ |
| 338 | LevelGranted: ab.LevelGranted, |
| 339 | Active: true, |
| 340 | CombatChance: ab.CombatChance, |
| 341 | DiceRoll: ab.Damage.DiceRoll, |
| 342 | DiceCount: ab.Damage.DiceCount, |
| 343 | SideCount: ab.Damage.SideCount, |
| 344 | StatMods: map[string]int(ab.StatMods), |
| 345 | Capacity: ab.Capacity, |
| 346 | } |
| 347 | for _, bId := range ab.BuffIds { |
| 348 | name := fmt.Sprintf(`#%d`, bId) |
| 349 | if spec := buffs.GetBuffSpec(bId); spec != nil { |
| 350 | name = spec.Name |
| 351 | } |
| 352 | d.BuffNames = append(d.BuffNames, name) |
| 353 | } |
| 354 | return d |
| 355 | } |
| 356 | |
| 357 | func GetPetCopy(petId string) Pet { |
| 358 | if petInfo, ok := petTypes[petId]; ok { |
no test coverage detected