package main
import (
"fmt"
"reflect"
)
var (
name string = "虞姬"
attack int = 165
hp int = 2977
mana int = 440
)
func main() {
var luban7hao int = 174
sunshangxiang := 168
Zhaohuanshi := "V10大佬"
zhaohuanshi := "普通玩家"
const (
w_name string = "无尽战刃"
w_attack int = 110
)
const (
baseDamage = 800
levelUp = 160
maxLevel = 6
)
fmt.Println("鲁班七号的初始攻击力为:", luban7hao)
fmt.Println("孙尚香的初始攻击力为:", sunshangxiang)
fmt.Println("孙尚香的变量类型为:", reflect.TypeOf(sunshangxiang))
fmt.Println("一号召唤师是:", Zhaohuanshi)
fmt.Println("二号召唤师是:", zhaohuanshi)
fmt.Println("英雄名:", name)
fmt.Println("攻击力:", attack)
fmt.Println("血量值:", hp)
fmt.Println("法力值:", mana)
fmt.Println("这件装备的名称是:", w_name)
fmt.Println("这件装备增加的攻击力是:", w_attack)
damage := baseDamage
for level := 1; level <= maxLevel; level++ {
fmt.Printf("技能楚歌起的等级为: %d,伤害值为: %d\n", level, damage)
damage += levelUp
}
}