本帖最后由 xman 于 2022-4-2 00:19 编辑
一、随機六種超強狀态魔法 autoBattle.lua - elseif ybjn and yb04 and mp >= 280 then
- local StatuschangeData = { 4409,4509,4609,4709,4809,4909 };
- local StaR = math.random(1, 6);
- Battle.ActionSelect(charIndex, CONST.BATTLE_COM.BATTLE_COM_P_STATUSCHANGE, 41, StatuschangeData[StaR]);
- elseif ybjn and yb04 and mp < 280 then
- Battle.ActionSelect(charIndex, CONST.BATTLE_COM.BATTLE_COM_ATTACK, 10, -1);
复制代码
二、開場即超強恢複魔法(第0回合) autoBattle.lua 其餘回合随機施放超補或超恢 (施放者血量50%以下優先超補) - elseif ybjn and yb06 and mp >= 480 then
- local HealRecoveryData = { {CONST.BATTLE_COM.BATTLE_COM_P_HEAL, 6309}, {CONST.BATTLE_COM.BATTLE_COM_P_LP_RECOVERY, 6609} };
- if Battle.GetTurn(battleIndex) == 0 then
- HRR = 2;
- else
- HRR = math.random(1, 2);
- if hp <= hpMax/2 then HRR = 1; end
- end
- Battle.ActionSelect(charIndex, HealRecoveryData[HRR][1], 40, HealRecoveryData[HRR][2]);
- elseif ybjn and yb06 and mp < 480 then
- Battle.ActionSelect(charIndex, CONST.BATTLE_COM.BATTLE_COM_ATTACK, 10, -1);
复制代码
兩個超強範圍都是我方全體所以40不變 配對改變前、後的部分
三、寵物 敵單體火焰屬性魔法強制爲敵全體(41) autoBattle.lua 主人血量50%以下施放攻擊無效 - elseif ybjn and ybcw05 and mp2 >= 100 then
- local MagicPhysicsData = { {CONST.BATTLE_COM.BATTLE_COM_P_MAGIC, 41, 2109}, {CONST.BATTLE_COM.BATTLE_COM_P_INEFFECTIVE_PHYSICS, 20+Battle.GetSlot(battleIndex, charIndex), 5909} };
- if hp <= hpMax/2 then
- MPR = 2;
- else
- MPR = 1;
- end
- Battle.ActionSelect(petIndex, MagicPhysicsData[MPR][1], MagicPhysicsData[MPR][2], MagicPhysicsData[MPR][3]);
- elseif ybjn and ybcw05 and mp2 < 100 then
- Battle.ActionSelect(petIndex, CONST.BATTLE_COM.BATTLE_COM_ATTACK, 10, -1);
复制代码
2109原爲單體火焰魔法,設定41強制爲敵方全體 5909原爲單體攻擊無效,設定20+ (0~9爲我方強力
|