package CmdStats import PlayerData import StatHandler import UnitData import TestUtils function printStat(player p, string statName, string prefix, int val, string suffix) printTimedToPlayer("|cffffcc00" + statName + ":|r " + prefix + "" + val.toString() + " " + suffix, 10., p) init chatEvent("-stats", () -> begin let p = GetTriggerPlayer() if xGetPlayerHero(p.getId()) != null let sbuf = xGetPlayerHero(p.getId()).xGetUnitData().unitStatBuffer printStat(p, "Life", "", sbuf.get(Stat.LIFE), "") printStat(p, "Mana", "", sbuf.get(Stat.MANA), "") printStat(p, "Strength", "", sbuf.get(Stat.STRE), "") printStat(p, "Agility", "", sbuf.get(Stat.AGIL), "") printStat(p, "Intelligence", "", sbuf.get(Stat.INTE), "") printStat(p, "Attack Power", "", sbuf.get(Stat.DAMA), "(total)") printStat(p, "Attack Power", "", sbuf.get(Stat.DAMP), "% (relativ bonus)") printStat(p, "Armor", "", sbuf.get(Stat.ARMO), "") printStat(p, "Attackspeed", "", sbuf.get(Stat.ASPD), "%") printStat(p, "Movespeed", "", sbuf.get(Stat.MOVE), "") printStat(p, "Evasion Chance", "", sbuf.get(Stat.EVAS), "%") printStat(p, "Crit Chance", "", sbuf.get(Stat.CCHA), "%") printStat(p, "Crit Multiplier", "", sbuf.get(Stat.CMUL), "% (of attackpower)") printStat(p, "Crit Bonusdamage", "", sbuf.get(Stat.CBON), "(applied after multiplier)") printStat(p, "Heal Received", "", sbuf.get(Stat.HREC), "%") printStat(p, "Attack Threat", "", sbuf.get(Stat.ATHR), "% (increased threat from normal attacks)") printStat(p, "Casttime", "-", sbuf.get(Stat.CSPE), "%") printStat(p, "Learn points (attributes)", "", xGetPlayerData(p.getId()).getLearnPointsStats(), "") printStat(p, "Learn points (talents)", "", xGetPlayerData(p.getId()).getLearnPointsTalents(), "") end)