Add Bugard in the Clouds battlefield and Hotupuku implementation#9983
Add Bugard in the Clouds battlefield and Hotupuku implementation#9983Lydya-nick77 wants to merge 1 commit into
Conversation
20a32d2 to
49a5877
Compare
| end | ||
|
|
||
| entity.onMobFight = function(mob, target) | ||
| local damageTaken = mob:getMaxHP() - mob:getHP() |
There was a problem hiding this comment.
I believe it only uses a 2 hour ability after taking 2000 of a specific type of damage is dealt, this probably needs to be a damage_taken listener that is checking for physical, ranged, or magic damage
633bad4 to
16f7a19
Compare
| { | ||
| { | ||
| { itemId = xi.item.NONE, weight = 950 }, -- Nothing | ||
| { itemId = xi.item.CLOUD_EVOKER, weight = 50 }, -- Cloud Evoker |
There was a problem hiding this comment.
For consistency:
{
{ itemId = xi.item.NONE, weight = 9500 }, -- Nothing
{ itemId = xi.item.CLOUD_EVOKER, weight = 500 }, -- Cloud Evoker|
|
||
| { | ||
| quantity = 2, | ||
| { itemId = xi.item.CHUNK_OF_ALUMINUM_ORE, weight = 1000 }, -- Chunk of Aluminum Ore |
There was a problem hiding this comment.
Again, for consistency:
{ itemId = xi.item.CHUNK_OF_ALUMINUM_ORE, weight = 10000 }, -- Chunk of Aluminum Ore
| OURYU = GetFirstID('Ouryu'), | ||
| RAZON = GetFirstID('Razon'), | ||
| WATCH_HIPPOGRYPH = GetFirstID('Watch_Hippogryph'), | ||
| HOTUPUKU = GetFirstID('Hotupuku'), |
There was a problem hiding this comment.
Place this entry in alphabetical order, please
| local immunityTriggerDamage = 2000 | ||
| local firstTwoHourTriggerDamage = 4000 | ||
| local minTwoHourDelay = 90 | ||
| local maxTwoHourDelay = 210 |
There was a problem hiding this comment.
Please no. Use the values directly. Besides, they are only used once anyway.
| mob:setMod(xi.mod.DEFP, 0) | ||
| mob:addMod(xi.mod.DEF, 150) | ||
|
|
||
| mob:addListener('DAMAGE_TAKEN', 'Hotupuku_DamageTracker', function(mobArg, damage, attacker, attackType, damageType) |
There was a problem hiding this comment.
EDITED. Ignore this concrete message. Not the one bellow.
There was a problem hiding this comment.
And while we are here, proposal:
mob:addListener('DAMAGE_TAKEN', 'Hotupuku_DamageTracker', function(mobArg, damage, attacker, attackType, damageType)
if mobArg:getLocalVar('immunityApplied') ~= 0 then
return
end
if attackType == xi.attackType.MAGICAL then
mobArg:setLocalVar('damageTypesUsed', bit.bor(mobArg:getLocalVar('damageTypesUsed'), 2))
return
end
if attackType == xi.attackType.RANGED then
mobArg:setLocalVar('damageTypesUsed', bit.bor(mobArg:getLocalVar('damageTypesUsed'), 4))
return
end
if attackType == xi.attackType.PHYSICAL then
-- Some ranged auto-attacks can arrive as PHYSICAL.
local attackerAction = attacker and attacker:getCurrentAction() or nil
if
attackerAction and
(attackerAction == xi.action.category.RANGED_START or
attackerAction == xi.action.category.RANGED_FINISH)
then
mobArg:setLocalVar('damageTypesUsed', bit.bor(mobArg:getLocalVar('damageTypesUsed'), 4))
else
mobArg:setLocalVar('damageTypesUsed', bit.bor(mobArg:getLocalVar('damageTypesUsed'), 1))
end
end
end)|
|
||
| target:takeDamage(addEffectDamage, mob, xi.attackType.MAGICAL, actionDamageType) | ||
| return xi.subEffect.EARTH_DAMAGE, xi.msg.basic.ADD_EFFECT_DMG_2, addEffectDamage | ||
| end |
There was a problem hiding this comment.
entity.onAdditionalEffect = function(mob, target, damage)
if mob:getLocalVar('enstoneEnabled') == 0 then
return 0, 0, 0
end
local pTable =
{
attackType = xi.attackType.MAGICAL,
magicalElement = xi.element.EARTH,
basePower = math.random(70, 90),
}
return xi.combat.action.executeAddEffectDamage(mob, target, pTable)
endd9aba97 to
16f7a19
Compare
e783fec to
4eb1fb8
Compare
I affirm:
What does this pull request do?
This pull request adds the ENM level capped 50 fight named: Bugard in the Clouds in Monarch Linn.
Based on videos I could find and capture taken to recreate the battle as close as possible.
The fight goes as follow:
Mob has about 5000 HP, every time it uses a TP move, it is repeated 2 more times (total 3x TP move)
After 2000 dmg, it gains a random immunity between melee, magic and ranged.
After 4000 dmg:
Loot in chest and % taken from the information I could find online.
Adds the battlefield file, Hotupuku fight script
Also change the 3 spawn points and the orientation of the NM in mob_spawn_points.sql
Steps to test these changes
Enter the battlefield in Monarch Linn