🤺 1. 英雄基础 (移动与战斗)
让英雄移动到指定的坐标 (x, y)。英雄会一直走到那里才停下。
hero.moveXY(24, 35)
hero.moveXY(24, 35);
💡 提示: 别跑出地图边界,会掉下悬崖的!(开玩笑的,但会撞墙)
攻击一个敌人。造成约27点伤害。
target = hero.findNearestEnemy()
if target:
hero.attack(target)
auto target = hero.findNearestEnemy();
if (target) {
hero.attack(target);
}
劈斩! 对周围10米内的所有敌人造成15点伤害。冷却时间10秒。
if hero.isReady("cleave"):
hero.cleave(enemy)
else:
hero.attack(enemy)
if (hero.isReady("cleave")) {
hero.cleave(enemy);
} else {
hero.attack(enemy);
}
🔥 爽快时刻: 当你被一群小矮人包围时,用这招最爽了!
举起盾牌!阻挡 40% 的普通伤害。
# 这里的代码很简单,只要一个词
hero.shield()
hero.shield();
说点什么,20米内的大家都能听到。
hero.say("放马过来!")
hero.say("放马过来!");
🧠 2. 智慧之眼 (感知与逻辑)
hero.findNearestEnemy(): 找到最近的敌人(9001米内)。
hero.findNearestItem(): 找到最近的物品(比如药水)。
hero.distanceTo(target): 计算你和目标之间的距离(米)。
hero.isReady(action): 检查技能是否冷却完毕(例如 "cleave")。
编写战斗逻辑的核心结构。
while True:
enemy = hero.findNearestEnemy()
if enemy:
hero.attack(enemy)
else:
hero.shield()
while (true) {
auto enemy = hero.findNearestEnemy();
if (enemy) {
hero.attack(enemy);
} else {
hero.shield();
}
}
🦅 3. 宠物指挥官 (本关核心!)
🦅 格里芬宝宝说: 这一关我是主角!我能帮你捡药水,还能把敌人抓起来丢掉!快看我的技能!
(所有技能来自: Baby Griffin)
让宠物飞到指定位置。可以去踩魔法盘!
pet.moveXY(20, 30)
pet.moveXY(20, 30);
让宠物把物品(如药水)捡回来给英雄。
potion = pet.findNearestByType("potion")
if potion:
pet.fetch(potion)
auto potion = pet.findNearestByType("potion");
if (potion) {
pet.fetch(potion);
}
宠物可以把单位抓起来,带到 (x, y)。
注意: 只能抓比较轻的单位(最大生命值 < 英雄最大生命值/10)。
# 把敌人抓走扔得远远的!
enemy = hero.findNearestEnemy()
if enemy:
pet.carryUnit(enemy, 10, 10)
auto enemy = hero.findNearestEnemy();
if (enemy) {
pet.carryUnit(enemy, 10, 10);
}
给宠物设定自动反应程序。比如"spawn"(出生时)做某事。
def onSpawn(event):
pet.say("我来啦!")
# 告诉宠物,出生时运行 onSpawn 函数
pet.on("spawn", onSpawn)
void onSpawn() {
pet.say("我来啦!");
}
// 告诉宠物,出生时运行 onSpawn 函数
pet.on("spawn", onSpawn);
pet.findNearestByType(type): 找到特定类型的东西(比如 "potion")。
pet.isReady(ability): 检查宠物技能是否冷却。
pet.trick(): 耍个把戏,好玩!
🏆 4. 力量顶峰 攻略手册
🌟 英雄的魔法盘 (Hero Power-Ups)
位于屏幕下方。每30秒只能选一个!
- 🔥 全军出击 (Fireball): 对屏幕内所有敌人造成100点伤害。(等敌人多了再用!)
- ⛺ 蓝色帐篷 (Summon Attackers): 召唤 2个侦察兵 + 1个投矛手 攻击对手。
- ⛺ 红白帐篷 (Summon Balanced): 混合部队。有些防守你,有些攻击敌人。
- ⛺ 白色帐篷 (Summon Defenders): 召唤 1个士兵 + 1个弓箭手 保护你。
🦅 宠物的魔法盘 (Pet Power-Ups)
位于山顶(屏幕上方)。宠物可以飞上去踩盘子给你加Buff!
| 图标 |
名称 |
效果 |
| 🗡️ |
力量 (Power) |
英雄攻速翻倍!劈斩冷却减少25%。 |
| 🐎 |
速度 (Speed) |
移动速度变成 220%!飞一般的通过。 |
| 🧪 |
生命 (Life) |
生命值瞬间回满!(保命神器) |
📊 兵种数据表
| 兵种 |
生命 ❤️ |
速度 🦶 |
攻击/秒 ⚔️ |
特点 |
| Thrower (投矛手) |
7 |
11 |
6.6 |
远程,血极少 |
| Scout (侦察兵) |
75 |
12 |
24 |
近战,速度快 |
| Soldier (士兵) |
200 |
6 |
12 |
肉盾 |
| Archer (弓箭手) |
30 |
9 |
26 |
远程高攻 |
| Munchkin (小矮人) |
14 |
12 |
4 |
主要的野怪敌人 |
💡 获胜策略建议
1. 宠物不要停: 你的宠物应该不停地在山顶飞来飞去,为你收集 Buff。
2. 30秒循环: 英雄的魔法每30秒一次。这期间你可以:
- 如果想打架:让宠物拿“力量”和“生命”药水。
- 如果想逃跑:让宠物拿“速度”和“生命”药水。
✨ 记住:存活最久的人就是胜利者,不一定要消灭对方英雄!