🧙‍♂️

力量的顶峰 (Power Peak)

之然老师: 欢迎来到雪山之巅!这里是勇者的试炼场。
在这个竞技场,你不仅要控制英雄战斗,更重要的是——指挥你的宠物去抢夺神殿里的魔法能力!
谁能活得更久,谁就是赢家!准备好你的代码了吗?

🤺 1. 英雄基础 (移动与战斗)
hero.moveXY(x, y) 技能来自: Leather Boots
让英雄移动到指定的坐标 (x, y)。英雄会一直走到那里才停下。
hero.moveXY(24, 35)
hero.moveXY(24, 35);
💡 提示: 别跑出地图边界,会掉下悬崖的!(开玩笑的,但会撞墙)
hero.attack(target) 技能来自: Long Sword
攻击一个敌人。造成约27点伤害。
target = hero.findNearestEnemy() if target: hero.attack(target)
auto target = hero.findNearestEnemy(); if (target) { hero.attack(target); }
hero.cleave(target) 技能来自: Long Sword
劈斩! 对周围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); }
🔥 爽快时刻: 当你被一群小矮人包围时,用这招最爽了!
hero.shield() 技能来自: Iron Shield
举起盾牌!阻挡 40% 的普通伤害。
# 这里的代码很简单,只要一个词 hero.shield()
hero.shield();
hero.say(message) 技能来自: Equestrian
说点什么,20米内的大家都能听到。
hero.say("放马过来!")
hero.say("放马过来!");
🧠 2. 智慧之眼 (感知与逻辑)
常用感知方法 技能来自: Glasses / Watch
  • hero.findNearestEnemy(): 找到最近的敌人(9001米内)。
  • hero.findNearestItem(): 找到最近的物品(比如药水)。
  • hero.distanceTo(target): 计算你和目标之间的距离(米)。
  • hero.isReady(action): 检查技能是否冷却完毕(例如 "cleave")。
while-true loop & if/else 技能来自: Programmaticon II
编写战斗逻辑的核心结构。
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(x, y) 宠物移动
让宠物飞到指定位置。可以去踩魔法盘!
pet.moveXY(20, 30)
pet.moveXY(20, 30);
pet.fetch(item) 取物
让宠物把物品(如药水)捡回来给英雄。
potion = pet.findNearestByType("potion") if potion: pet.fetch(potion)
auto potion = pet.findNearestByType("potion"); if (potion) { pet.fetch(potion); }
pet.carryUnit(target, x, y) 搬运单位
宠物可以把单位抓起来,带到 (x, y)。
注意: 只能抓比较轻的单位(最大生命值 < 英雄最大生命值/10)。
# 把敌人抓走扔得远远的! enemy = hero.findNearestEnemy() if enemy: pet.carryUnit(enemy, 10, 10)
auto enemy = hero.findNearestEnemy(); if (enemy) { pet.carryUnit(enemy, 10, 10); }
pet.on(eventType, handler) 事件处理
给宠物设定自动反应程序。比如"spawn"(出生时)做某事。
def onSpawn(event): pet.say("我来啦!") # 告诉宠物,出生时运行 onSpawn 函数 pet.on("spawn", onSpawn)
void onSpawn() { pet.say("我来啦!"); } // 告诉宠物,出生时运行 onSpawn 函数 pet.on("spawn", onSpawn);
其他宠物技能 娱乐与辅助
🏆 4. 力量顶峰 攻略手册

🌟 英雄的魔法盘 (Hero Power-Ups)

位于屏幕下方。每30秒只能选一个!

🦅 宠物的魔法盘 (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秒一次。这期间你可以:

✨ 记住:存活最久的人就是胜利者,不一定要消灭对方英雄!