From 7eee10269dc3c1e08d2c3b10501d37098de3d819 Mon Sep 17 00:00:00 2001 From: Umeboshi Date: Wed, 8 Apr 2026 03:48:51 -0700 Subject: [PATCH] [core][lua] Physical Mobskll Refactor --- scripts/actions/mobskills/10000_needles.lua | 26 +- scripts/actions/mobskills/1000_needles.lua | 29 +- scripts/actions/mobskills/2000_needles.lua | 26 +- scripts/actions/mobskills/4000_needles.lua | 26 +- scripts/actions/mobskills/abyssal_strike.lua | 34 +- scripts/actions/mobskills/acheron_kick.lua | 34 +- scripts/actions/mobskills/aegis_schism.lua | 21 +- .../actions/mobskills/aerial_collision.lua | 34 +- scripts/actions/mobskills/aerial_wheel.lua | 35 +- scripts/actions/mobskills/agaricus.lua | 32 +- scripts/actions/mobskills/alabaster_burst.lua | 36 +- .../actions/mobskills/amatsu_hanaikusa.lua | 30 +- scripts/actions/mobskills/amatsu_kazakiri.lua | 26 +- scripts/actions/mobskills/amatsu_torimai.lua | 26 +- .../actions/mobskills/amatsu_tsukikage.lua | 26 +- .../actions/mobskills/amatsu_tsukioboro.lua | 30 +- .../actions/mobskills/amatsu_yukiarashi.lua | 30 +- scripts/actions/mobskills/amon_drive.lua | 41 +- scripts/actions/mobskills/amorphic_scythe.lua | 26 +- scripts/actions/mobskills/amorphic_spikes.lua | 26 +- scripts/actions/mobskills/antigravity.lua | 27 +- scripts/actions/mobskills/antigravity_1.lua | 31 +- scripts/actions/mobskills/antigravity_2.lua | 31 +- scripts/actions/mobskills/antigravity_3.lua | 27 +- scripts/actions/mobskills/arbor_storm.lua | 34 +- scripts/actions/mobskills/arching_arrow.lua | 29 +- scripts/actions/mobskills/arrow_deluge.lua | 35 +- scripts/actions/mobskills/ascetics_fury.lua | 25 +- scripts/actions/mobskills/astral_gate.lua | 30 +- scripts/actions/mobskills/asuran_claws.lua | 26 +- scripts/actions/mobskills/asuran_fists.lua | 23 +- .../actions/mobskills/august_melee_axe.lua | 28 +- .../actions/mobskills/august_melee_bow.lua | 24 +- .../actions/mobskills/august_melee_h2h.lua | 24 +- .../actions/mobskills/august_melee_sword.lua | 24 +- .../actions/mobskills/auto_attack_geush.lua | 30 +- .../mobskills/auto_attack_shantotto_ii.lua | 2 + scripts/actions/mobskills/axe_kick.lua | 24 +- scripts/actions/mobskills/axe_throw.lua | 40 +- scripts/actions/mobskills/back_heel.lua | 28 +- scripts/actions/mobskills/back_swish.lua | 36 +- scripts/actions/mobskills/barbed_crescent.lua | 29 +- scripts/actions/mobskills/barracuda_dive.lua | 26 +- scripts/actions/mobskills/batterhorn.lua | 31 +- scripts/actions/mobskills/battle_dance.lua | 31 +- scripts/actions/mobskills/beak_lunge.lua | 33 +- scripts/actions/mobskills/bear_killer.lua | 24 +- scripts/actions/mobskills/beatdown.lua | 28 +- scripts/actions/mobskills/benthic_typhoon.lua | 33 +- scripts/actions/mobskills/big_horn.lua | 27 +- scripts/actions/mobskills/big_scissors.lua | 32 +- scripts/actions/mobskills/bilgestorm.lua | 45 +- .../actions/mobskills/biotic_boomerang.lua | 30 +- scripts/actions/mobskills/black_halo.lua | 30 +- scripts/actions/mobskills/blade_jin.lua | 31 +- scripts/actions/mobskills/blade_ku.lua | 29 +- scripts/actions/mobskills/blade_metsu.lua | 31 +- scripts/actions/mobskills/blade_to.lua | 29 +- .../actions/mobskills/blind_side_barrage.lua | 47 +- scripts/actions/mobskills/blind_vortex.lua | 30 +- scripts/actions/mobskills/blindeye.lua | 35 +- scripts/actions/mobskills/blockhead.lua | 26 +- scripts/actions/mobskills/bloodrake.lua | 29 +- scripts/actions/mobskills/bloody_beak.lua | 19 +- scripts/actions/mobskills/bloody_caress.lua | 35 +- scripts/actions/mobskills/bloody_claw.lua | 32 +- scripts/actions/mobskills/blow.lua | 32 +- scripts/actions/mobskills/bludgeon.lua | 31 +- scripts/actions/mobskills/body_slam.lua | 34 +- scripts/actions/mobskills/bomb_toss.lua | 2 +- scripts/actions/mobskills/bone_crunch.lua | 29 +- .../mobskills/bonebreaking_barrage.lua | 29 +- scripts/actions/mobskills/brain_crush.lua | 29 +- scripts/actions/mobskills/brain_drain.lua | 27 +- scripts/actions/mobskills/brain_spike.lua | 31 +- .../actions/mobskills/broadside_barrage.lua | 47 +- scripts/actions/mobskills/burst.lua | 27 +- scripts/actions/mobskills/calamity.lua | 35 +- scripts/actions/mobskills/calcifying_claw.lua | 26 +- .../actions/mobskills/calcifying_deluge.lua | 36 +- scripts/actions/mobskills/camisado.lua | 25 +- scripts/actions/mobskills/cannonball.lua | 28 +- scripts/actions/mobskills/carousel.lua | 28 +- scripts/actions/mobskills/catapult.lua | 30 +- scripts/actions/mobskills/catastrophe.lua | 27 +- scripts/actions/mobskills/chant_du_cygne.lua | 26 +- scripts/actions/mobskills/chaotic_strike.lua | 27 +- scripts/actions/mobskills/choke_breath.lua | 28 +- scripts/actions/mobskills/chomp_rush.lua | 33 +- scripts/actions/mobskills/circle_blade.lua | 28 +- .../actions/mobskills/circle_of_flames.lua | 2 +- scripts/actions/mobskills/claw.lua | 26 +- scripts/actions/mobskills/claw_cyclone.lua | 30 +- scripts/actions/mobskills/claw_storm.lua | 33 +- scripts/actions/mobskills/clobber.lua | 31 +- scripts/actions/mobskills/colossal_blow.lua | 40 +- scripts/actions/mobskills/colossal_slam.lua | 30 +- scripts/actions/mobskills/combo.lua | 26 +- .../mobskills/concussive_oscillation.lua | 28 +- scripts/actions/mobskills/condemnation.lua | 37 +- scripts/actions/mobskills/coronach.lua | 33 +- scripts/actions/mobskills/crescent_fang.lua | 26 +- scripts/actions/mobskills/crescent_moon.lua | 32 +- scripts/actions/mobskills/crippling_slam.lua | 34 +- scripts/actions/mobskills/critical_bite.lua | 32 +- .../actions/mobskills/cronos_sling_eta.lua | 26 +- .../actions/mobskills/cronos_sling_lambda.lua | 26 +- .../actions/mobskills/cronos_sling_theta.lua | 26 +- scripts/actions/mobskills/cross_attack.lua | 27 +- scripts/actions/mobskills/cross_reaver.lua | 35 +- scripts/actions/mobskills/crossthrash.lua | 31 +- scripts/actions/mobskills/cyclotail.lua | 26 +- scripts/actions/mobskills/damnation_dive.lua | 33 +- .../actions/mobskills/damnation_dive_nm.lua | 33 +- scripts/actions/mobskills/dancing_edge.lua | 28 +- scripts/actions/mobskills/daybreak.lua | 9 +- scripts/actions/mobskills/deadly_drive.lua | 29 +- scripts/actions/mobskills/deadly_hold.lua | 36 +- scripts/actions/mobskills/deal_out.lua | 37 +- scripts/actions/mobskills/death_scissors.lua | 38 +- scripts/actions/mobskills/deathgnash.lua | 34 +- scripts/actions/mobskills/debonair_rush.lua | 26 +- scripts/actions/mobskills/decollation.lua | 28 +- scripts/actions/mobskills/decussate.lua | 29 +- scripts/actions/mobskills/delta_thrust.lua | 31 +- scripts/actions/mobskills/di_bite_attack.lua | 44 +- scripts/actions/mobskills/di_horn_attack.lua | 44 +- scripts/actions/mobskills/di_kick_attack.lua | 33 +- scripts/actions/mobskills/di_trample.lua | 40 +- .../actions/mobskills/dimensional_death.lua | 26 +- scripts/actions/mobskills/dirty_claw.lua | 29 +- scripts/actions/mobskills/disseverment.lua | 31 +- .../actions/mobskills/divesting_stampede.lua | 31 +- scripts/actions/mobskills/dominion_slash.lua | 51 +- scripts/actions/mobskills/double_claw.lua | 26 +- scripts/actions/mobskills/double_down.lua | 33 +- scripts/actions/mobskills/double_kick.lua | 33 +- scripts/actions/mobskills/double_punch.lua | 28 +- scripts/actions/mobskills/double_slap.lua | 26 +- scripts/actions/mobskills/dragon_kick.lua | 29 +- scripts/actions/mobskills/dragonfall.lua | 35 +- scripts/actions/mobskills/dread_dive.lua | 30 +- scripts/actions/mobskills/drill_branch.lua | 32 +- scripts/actions/mobskills/drill_branch_nm.lua | 32 +- scripts/actions/mobskills/drill_claw.lua | 30 +- scripts/actions/mobskills/drop_hammer.lua | 38 +- scripts/actions/mobskills/dual_strike.lua | 31 +- scripts/actions/mobskills/dynamic_assault.lua | 30 +- .../actions/mobskills/dynamic_implosion.lua | 32 +- scripts/actions/mobskills/eagle_eye_shot.lua | 35 +- scripts/actions/mobskills/earth_shock.lua | 31 +- scripts/actions/mobskills/eclipse_bite.lua | 26 +- scripts/actions/mobskills/ectosmash.lua | 38 +- scripts/actions/mobskills/empty_beleaguer.lua | 27 +- scripts/actions/mobskills/empty_crush.lua | 24 +- scripts/actions/mobskills/empty_cutter.lua | 26 +- .../mobskills/empty_cutter_thinker.lua | 31 +- scripts/actions/mobskills/empty_seed.lua | 31 +- scripts/actions/mobskills/empty_thrash.lua | 29 +- scripts/actions/mobskills/entangle_drain.lua | 33 +- scripts/actions/mobskills/entangle_poison.lua | 38 +- scripts/actions/mobskills/envoutement.lua | 32 +- scripts/actions/mobskills/equalizer.lua | 25 +- scripts/actions/mobskills/evisceration.lua | 29 +- scripts/actions/mobskills/eye_scratch.lua | 33 +- scripts/actions/mobskills/fang_rush.lua | 34 +- scripts/actions/mobskills/fast_blade.lua | 27 +- scripts/actions/mobskills/fear_touch.lua | 32 +- .../actions/mobskills/feather_maelstrom.lua | 32 +- scripts/actions/mobskills/feather_storm.lua | 27 +- scripts/actions/mobskills/fell_cleave.lua | 29 +- scripts/actions/mobskills/feral_peck.lua | 45 +- scripts/actions/mobskills/fevered_pitch.lua | 38 +- scripts/actions/mobskills/final_heaven.lua | 26 +- .../actions/mobskills/final_retribution.lua | 38 +- scripts/actions/mobskills/final_sting.lua | 40 +- scripts/actions/mobskills/flailing_trunk.lua | 36 +- scripts/actions/mobskills/flaming_crush.lua | 26 +- scripts/actions/mobskills/flat_blade.lua | 39 +- scripts/actions/mobskills/fluid_spread.lua | 34 +- scripts/actions/mobskills/fluid_toss.lua | 38 +- .../actions/mobskills/fluid_toss_claret.lua | 42 +- scripts/actions/mobskills/flurry_of_rage.lua | 26 +- scripts/actions/mobskills/foot_kick.lua | 34 +- scripts/actions/mobskills/forceful_blow.lua | 34 +- .../actions/mobskills/formation_attack.lua | 35 +- scripts/actions/mobskills/foxfire.lua | 35 +- scripts/actions/mobskills/freeze_rush.lua | 30 +- scripts/actions/mobskills/frenetic_rip.lua | 29 +- scripts/actions/mobskills/frogkick.lua | 31 +- scripts/actions/mobskills/frypan.lua | 30 +- scripts/actions/mobskills/full-force_blow.lua | 31 +- scripts/actions/mobskills/fulminous_fury.lua | 5 +- scripts/actions/mobskills/gaea_stream_eta.lua | 26 +- .../actions/mobskills/gaea_stream_lambda.lua | 26 +- .../actions/mobskills/gaea_stream_theta.lua | 26 +- .../actions/mobskills/gate_of_tartarus.lua | 33 +- scripts/actions/mobskills/geirskogul.lua | 28 +- scripts/actions/mobskills/giga_scream.lua | 28 +- scripts/actions/mobskills/giga_slash.lua | 30 +- .../actions/mobskills/glacier_splitter.lua | 36 +- scripts/actions/mobskills/gnash.lua | 36 +- scripts/actions/mobskills/goblin_rush.lua | 25 +- scripts/actions/mobskills/gouging_branch.lua | 34 +- scripts/actions/mobskills/grand_slam.lua | 24 +- scripts/actions/mobskills/grapeshot.lua | 29 +- scripts/actions/mobskills/grapple.lua | 26 +- scripts/actions/mobskills/grating_tantara.lua | 35 +- scripts/actions/mobskills/gravitic_horn.lua | 38 +- scripts/actions/mobskills/gravity_wheel.lua | 38 +- scripts/actions/mobskills/great_wheel.lua | 35 +- scripts/actions/mobskills/grim_halo.lua | 32 +- scripts/actions/mobskills/grim_reaper.lua | 37 +- scripts/actions/mobskills/ground_strike.lua | 25 +- scripts/actions/mobskills/groundburst.lua | 35 +- scripts/actions/mobskills/guided_missile.lua | 33 +- .../actions/mobskills/guided_missile_ii.lua | 15 +- scripts/actions/mobskills/guillotine.lua | 32 +- scripts/actions/mobskills/gust_slash.lua | 25 +- scripts/actions/mobskills/gusting_gouge.lua | 34 +- scripts/actions/mobskills/hammer-go-round.lua | 32 +- scripts/actions/mobskills/hammer_beak.lua | 30 +- scripts/actions/mobskills/hammerblow.lua | 34 +- scripts/actions/mobskills/hane_fubuki.lua | 32 +- scripts/actions/mobskills/happobarai.lua | 31 +- scripts/actions/mobskills/hard_slash.lua | 32 +- scripts/actions/mobskills/havoc_spiral.lua | 41 +- scripts/actions/mobskills/haymaker.lua | 34 +- scripts/actions/mobskills/head_butt.lua | 28 +- .../actions/mobskills/head_butt_quadav.lua | 29 +- .../actions/mobskills/head_butt_turtle.lua | 28 +- scripts/actions/mobskills/heavy_blow.lua | 32 +- scripts/actions/mobskills/heavy_stomp.lua | 33 +- scripts/actions/mobskills/heavy_strike.lua | 26 +- .../actions/mobskills/heavy_strike_ulli.lua | 26 +- scripts/actions/mobskills/hell_slash.lua | 34 +- scripts/actions/mobskills/hellclap.lua | 29 +- scripts/actions/mobskills/helldive.lua | 32 +- scripts/actions/mobskills/hexa_strike.lua | 29 +- scripts/actions/mobskills/hexidiscs.lua | 42 +- scripts/actions/mobskills/hiden_sokyaku.lua | 33 +- .../mobskills/high-tension_discharger.lua | 2 +- scripts/actions/mobskills/hollow_smite.lua | 27 +- scripts/actions/mobskills/hoof_volley.lua | 37 +- scripts/actions/mobskills/howling_fist.lua | 24 +- scripts/actions/mobskills/hydro_shot.lua | 30 +- scripts/actions/mobskills/hyper_pulse.lua | 23 +- .../actions/mobskills/hysteric_assault.lua | 25 +- .../actions/mobskills/hysteric_barrage.lua | 33 +- scripts/actions/mobskills/impact_roar.lua | 25 +- scripts/actions/mobskills/impale.lua | 51 +- scripts/actions/mobskills/impalement.lua | 39 +- .../actions/mobskills/imperial_authority.lua | 29 +- scripts/actions/mobskills/impulse_drive.lua | 36 +- scripts/actions/mobskills/incensed_pummel.lua | 27 +- scripts/actions/mobskills/incessant_fists.lua | 31 +- .../mobskills/infernal_deliverance.lua | 26 +- scripts/actions/mobskills/insipid_nip.lua | 34 +- scripts/actions/mobskills/javelin_throw.lua | 40 +- scripts/actions/mobskills/jet_stream.lua | 27 +- scripts/actions/mobskills/judgment.lua | 25 +- scripts/actions/mobskills/jump.lua | 30 +- scripts/actions/mobskills/jumping_thrust.lua | 30 +- scripts/actions/mobskills/kick_back.lua | 31 +- scripts/actions/mobskills/kick_out.lua | 34 +- .../actions/mobskills/king_cobra_clamp.lua | 29 +- .../actions/mobskills/knights_of_round.lua | 29 +- scripts/actions/mobskills/lamb_chop.lua | 26 +- scripts/actions/mobskills/lateral_slash.lua | 35 +- scripts/actions/mobskills/leaf_dagger.lua | 39 +- scripts/actions/mobskills/leaping_cleave.lua | 38 +- scripts/actions/mobskills/lethe_arrows.lua | 34 +- scripts/actions/mobskills/light_blade.lua | 36 +- scripts/actions/mobskills/luminous_lance.lua | 36 +- .../actions/mobskills/lunar_revolution.lua | 26 +- scripts/actions/mobskills/maats_bash.lua | 29 +- scripts/actions/mobskills/mandible_bite.lua | 35 +- scripts/actions/mobskills/mandibular_bite.lua | 32 +- scripts/actions/mobskills/mangle.lua | 40 +- scripts/actions/mobskills/mantle_pierce.lua | 34 +- scripts/actions/mobskills/medusa_javelin.lua | 33 +- scripts/actions/mobskills/megalith_throw.lua | 30 +- scripts/actions/mobskills/mercy_stroke.lua | 29 +- .../actions/mobskills/metatron_torment.lua | 32 +- scripts/actions/mobskills/microquake.lua | 35 +- scripts/actions/mobskills/mix_dark_potion.lua | 27 +- scripts/actions/mobskills/moonlit_charge.lua | 26 +- scripts/actions/mobskills/morning_glory.lua | 37 +- .../actions/mobskills/mortal_revolution.lua | 24 +- scripts/actions/mobskills/mountain_buster.lua | 27 +- scripts/actions/mobskills/mow.lua | 40 +- scripts/actions/mobskills/namas_arrow.lua | 32 +- scripts/actions/mobskills/necrobane.lua | 15 +- scripts/actions/mobskills/necropurge.lua | 27 +- scripts/actions/mobskills/needleshot.lua | 34 +- scripts/actions/mobskills/netherspikes.lua | 32 +- scripts/actions/mobskills/nimble_snap.lua | 26 +- scripts/actions/mobskills/no_quarter.lua | 26 +- scripts/actions/mobskills/noble_frenzy.lua | 23 +- scripts/actions/mobskills/null_field.lua | 9 +- scripts/actions/mobskills/nullsong.lua | 29 +- scripts/actions/mobskills/numbshroom.lua | 36 +- scripts/actions/mobskills/oblivion_smash.lua | 40 +- scripts/actions/mobskills/oisoya.lua | 37 +- scripts/actions/mobskills/omega_javelin.lua | 31 +- scripts/actions/mobskills/one-ilm_punch.lua | 24 +- scripts/actions/mobskills/onrush.lua | 30 +- scripts/actions/mobskills/onslaught.lua | 34 +- .../actions/mobskills/optic_induration.lua | 41 +- scripts/actions/mobskills/ore_toss.lua | 36 +- scripts/actions/mobskills/overthrow.lua | 33 +- scripts/actions/mobskills/painful_whip.lua | 28 +- scripts/actions/mobskills/palsynyxis.lua | 33 +- scripts/actions/mobskills/pandemic_nip.lua | 124 +- scripts/actions/mobskills/panzerfaust.lua | 30 +- scripts/actions/mobskills/panzerschreck.lua | 32 +- scripts/actions/mobskills/peacebreaker.lua | 33 +- scripts/actions/mobskills/pecking_flurry.lua | 26 +- scripts/actions/mobskills/pelagic_tempest.lua | 37 +- scripts/actions/mobskills/penta_thrust.lua | 31 +- scripts/actions/mobskills/percussive_foin.lua | 38 +- .../actions/mobskills/phantasmal_dance.lua | 31 +- scripts/actions/mobskills/phase_shift_1.lua | 27 +- scripts/actions/mobskills/phase_shift_2.lua | 30 +- scripts/actions/mobskills/phase_shift_3.lua | 36 +- scripts/actions/mobskills/pile_pitch.lua | 26 +- scripts/actions/mobskills/pinecone_bomb.lua | 32 +- .../actions/mobskills/pinecone_bomb_nm.lua | 28 +- scripts/actions/mobskills/pinning_shot.lua | 36 +- scripts/actions/mobskills/pirate_pummel.lua | 30 +- scripts/actions/mobskills/pit_ambush.lua | 27 +- scripts/actions/mobskills/plague_swipe.lua | 36 +- scripts/actions/mobskills/poison_nails.lua | 26 +- scripts/actions/mobskills/poison_pick.lua | 34 +- scripts/actions/mobskills/poison_sting.lua | 28 +- scripts/actions/mobskills/pole_swing.lua | 36 +- scripts/actions/mobskills/potent_lunge.lua | 31 +- scripts/actions/mobskills/pounce.lua | 27 +- scripts/actions/mobskills/powder_keg.lua | 32 +- scripts/actions/mobskills/power_attack.lua | 27 +- .../actions/mobskills/power_attack_armed.lua | 27 +- .../actions/mobskills/power_attack_beetle.lua | 28 +- .../mobskills/power_attack_unarmed.lua | 27 +- scripts/actions/mobskills/power_slash.lua | 32 +- scripts/actions/mobskills/predator_claws.lua | 27 +- scripts/actions/mobskills/primal_drill.lua | 34 +- scripts/actions/mobskills/punch.lua | 26 +- scripts/actions/mobskills/quadrastrike.lua | 32 +- .../actions/mobskills/quadratic_continuum.lua | 26 +- scripts/actions/mobskills/queasyshroom.lua | 43 +- .../actions/mobskills/radiant_sacrament.lua | 34 +- scripts/actions/mobskills/raging_rush.lua | 30 +- scripts/actions/mobskills/ram_charge.lua | 29 +- scripts/actions/mobskills/rampage.lua | 34 +- scripts/actions/mobskills/rampant_gnaw.lua | 28 +- scripts/actions/mobskills/rampant_stance.lua | 38 +- scripts/actions/mobskills/randgrith.lua | 31 +- scripts/actions/mobskills/random_needles.lua | 50 +- scripts/actions/mobskills/ranged_attack.lua | 58 +- scripts/actions/mobskills/razor_fang.lua | 30 +- .../actions/mobskills/reactor_overload.lua | 2 +- scripts/actions/mobskills/recoil_dive.lua | 27 +- scripts/actions/mobskills/rhino_attack.lua | 30 +- scripts/actions/mobskills/rhinowrecker.lua | 27 +- scripts/actions/mobskills/ripper_fang.lua | 28 +- scripts/actions/mobskills/rock_smash.lua | 33 +- scripts/actions/mobskills/rock_throw.lua | 31 +- scripts/actions/mobskills/roller_chain.lua | 13 +- scripts/actions/mobskills/royal_bash.lua | 26 +- scripts/actions/mobskills/rush.lua | 27 +- scripts/actions/mobskills/rushing_drub.lua | 36 +- scripts/actions/mobskills/rushing_slash.lua | 36 +- scripts/actions/mobskills/rushing_stab.lua | 36 +- scripts/actions/mobskills/sand_trap.lua | 33 +- scripts/actions/mobskills/saucepan.lua | 33 +- scripts/actions/mobskills/savage_blade.lua | 32 +- scripts/actions/mobskills/scission_thrust.lua | 38 +- scripts/actions/mobskills/scorching_lash.lua | 35 +- scripts/actions/mobskills/scourge.lua | 28 +- scripts/actions/mobskills/screwdriver.lua | 29 +- scripts/actions/mobskills/scythe_tail.lua | 34 +- scripts/actions/mobskills/seedspray.lua | 29 +- scripts/actions/mobskills/seismic_tail.lua | 28 +- scripts/actions/mobskills/seismostomp.lua | 32 +- scripts/actions/mobskills/serpentine_tail.lua | 31 +- scripts/actions/mobskills/severing_fang.lua | 33 +- scripts/actions/mobskills/shackled_fists.lua | 27 +- scripts/actions/mobskills/shadow_claw.lua | 27 +- scripts/actions/mobskills/shadow_thrust.lua | 34 +- scripts/actions/mobskills/shadowstitch.lua | 28 +- scripts/actions/mobskills/shakeshroom.lua | 36 +- scripts/actions/mobskills/shark_bite.lua | 26 +- scripts/actions/mobskills/sharp_sting.lua | 36 +- scripts/actions/mobskills/sheep_charge.lua | 26 +- .../actions/mobskills/sheep_charge_melee.lua | 28 +- scripts/actions/mobskills/shell_bash.lua | 27 +- scripts/actions/mobskills/shibaraku.lua | 31 +- scripts/actions/mobskills/shield_bash.lua | 30 +- scripts/actions/mobskills/shield_strike.lua | 33 +- scripts/actions/mobskills/shock_strike.lua | 28 +- scripts/actions/mobskills/shockwave.lua | 24 +- scripts/actions/mobskills/shoulder_attack.lua | 27 +- scripts/actions/mobskills/shoulder_slam.lua | 27 +- scripts/actions/mobskills/sickle_moon.lua | 26 +- scripts/actions/mobskills/sickle_slash.lua | 36 +- scripts/actions/mobskills/sideswipe.lua | 35 +- scripts/actions/mobskills/sidewinder.lua | 28 +- scripts/actions/mobskills/sinuate_rush.lua | 34 +- scripts/actions/mobskills/skewer.lua | 29 +- scripts/actions/mobskills/skullbreaker.lua | 34 +- scripts/actions/mobskills/slam_dunk.lua | 28 +- scripts/actions/mobskills/sledgehammer.lua | 33 +- scripts/actions/mobskills/sling_bomb.lua | 32 +- scripts/actions/mobskills/smite_of_fury.lua | 23 +- scripts/actions/mobskills/smite_of_rage.lua | 23 +- .../actions/mobskills/smoke_discharger.lua | 2 +- scripts/actions/mobskills/somersault.lua | 28 +- scripts/actions/mobskills/somersault_kick.lua | 32 +- scripts/actions/mobskills/sonic_blade.lua | 35 +- .../actions/mobskills/soulshattering_roar.lua | 2 +- scripts/actions/mobskills/spike_flail.lua | 28 +- scripts/actions/mobskills/spikeball.lua | 27 +- scripts/actions/mobskills/spinal_cleave.lua | 36 +- scripts/actions/mobskills/spine_lash.lua | 32 +- scripts/actions/mobskills/spinning_attack.lua | 32 +- scripts/actions/mobskills/spinning_claw.lua | 31 +- scripts/actions/mobskills/spinning_dive.lua | 26 +- scripts/actions/mobskills/spinning_fin.lua | 32 +- scripts/actions/mobskills/spinning_scythe.lua | 26 +- scripts/actions/mobskills/spinning_top.lua | 31 +- scripts/actions/mobskills/spiral_hell.lua | 26 +- scripts/actions/mobskills/spiral_spin.lua | 32 +- scripts/actions/mobskills/sprout_smack.lua | 31 +- scripts/actions/mobskills/sprout_spin.lua | 26 +- scripts/actions/mobskills/stampede.lua | 25 +- scripts/actions/mobskills/stasis.lua | 29 +- scripts/actions/mobskills/static_filament.lua | 2 +- scripts/actions/mobskills/stave_toss.lua | 33 +- scripts/actions/mobskills/stellar_arrow.lua | 31 +- .../actions/mobskills/stifling_tantara.lua | 30 +- scripts/actions/mobskills/stomping.lua | 27 +- scripts/actions/mobskills/stone_throw.lua | 34 +- scripts/actions/mobskills/sub-zero_smash.lua | 41 +- scripts/actions/mobskills/suction.lua | 34 +- scripts/actions/mobskills/sudden_lunge.lua | 34 +- scripts/actions/mobskills/sweep.lua | 32 +- scripts/actions/mobskills/sweeping_flail.lua | 35 +- scripts/actions/mobskills/swift_blade.lua | 28 +- scripts/actions/mobskills/tachi_gekko.lua | 34 +- scripts/actions/mobskills/tachi_kaiten.lua | 29 +- scripts/actions/mobskills/tachi_kasha.lua | 34 +- scripts/actions/mobskills/tachi_yukikaze.lua | 34 +- scripts/actions/mobskills/tackle.lua | 30 +- scripts/actions/mobskills/tail_blow.lua | 31 +- scripts/actions/mobskills/tail_crush.lua | 35 +- scripts/actions/mobskills/tail_lash.lua | 36 +- scripts/actions/mobskills/tail_roll.lua | 25 +- scripts/actions/mobskills/tail_slap.lua | 30 +- scripts/actions/mobskills/tail_smash.lua | 33 +- scripts/actions/mobskills/tail_swing.lua | 31 +- scripts/actions/mobskills/tail_thrust.lua | 35 +- scripts/actions/mobskills/tail_whip.lua | 26 +- scripts/actions/mobskills/tartaric_sigil.lua | 8 +- scripts/actions/mobskills/tentacle.lua | 31 +- .../actions/mobskills/tenzen_ranged_high.lua | 38 +- .../actions/mobskills/tenzen_ranged_low.lua | 38 +- scripts/actions/mobskills/tera_slash.lua | 29 +- scripts/actions/mobskills/terror_touch.lua | 36 +- .../actions/mobskills/the_wrath_of_gudha.lua | 26 +- .../actions/mobskills/thrashing_assault.lua | 28 +- scripts/actions/mobskills/throat_stab.lua | 46 +- scripts/actions/mobskills/tidal_dive.lua | 37 +- scripts/actions/mobskills/tidal_slash.lua | 11 +- scripts/actions/mobskills/tortoise_stomp.lua | 37 +- .../actions/mobskills/touchdown_bahamut.lua | 15 +- scripts/actions/mobskills/tourbillion.lua | 41 +- scripts/actions/mobskills/toxic_pick.lua | 42 +- scripts/actions/mobskills/train_fall.lua | 28 +- scripts/actions/mobskills/trample.lua | 33 +- scripts/actions/mobskills/trebuchet.lua | 28 +- scripts/actions/mobskills/trembling.lua | 40 +- scripts/actions/mobskills/tremorous_tread.lua | 32 +- scripts/actions/mobskills/tribulation.lua | 2 +- scripts/actions/mobskills/triclip.lua | 36 +- scripts/actions/mobskills/true_strike.lua | 28 +- scripts/actions/mobskills/tusk.lua | 26 +- .../actions/mobskills/twirling_dervish.lua | 27 +- scripts/actions/mobskills/typhoon.lua | 31 +- scripts/actions/mobskills/umbra_smash.lua | 27 +- scripts/actions/mobskills/unblest_jambiya.lua | 16 +- scripts/actions/mobskills/uppercut.lua | 34 +- .../actions/mobskills/uranos_cascade_eta.lua | 26 +- .../mobskills/uranos_cascade_lambda.lua | 27 +- .../mobskills/uranos_cascade_theta.lua | 26 +- scripts/actions/mobskills/vampiric_lash.lua | 27 +- scripts/actions/mobskills/vampiric_root.lua | 17 +- scripts/actions/mobskills/vanity_dive.lua | 26 +- scripts/actions/mobskills/vanity_drive.lua | 26 +- scripts/actions/mobskills/vanity_strike.lua | 32 +- scripts/actions/mobskills/velocious_blade.lua | 35 +- scripts/actions/mobskills/venom_sting.lua | 27 +- scripts/actions/mobskills/vertical_cleave.lua | 33 +- scripts/actions/mobskills/vertical_slash.lua | 32 +- scripts/actions/mobskills/vicious_claw.lua | 31 +- scripts/actions/mobskills/victory_beacon.lua | 26 +- scripts/actions/mobskills/victory_smite.lua | 28 +- scripts/actions/mobskills/voiceless_storm.lua | 2 +- scripts/actions/mobskills/vorpal_blade.lua | 32 +- scripts/actions/mobskills/vorpal_scythe.lua | 29 +- scripts/actions/mobskills/vorpal_wheel.lua | 36 +- scripts/actions/mobskills/vortex.lua | 31 +- scripts/actions/mobskills/walk_the_plank.lua | 32 +- scripts/actions/mobskills/wanion.lua | 1 + scripts/actions/mobskills/warped_wail.lua | 4 +- scripts/actions/mobskills/wheeling_thrust.lua | 26 +- scripts/actions/mobskills/whip_tongue.lua | 34 +- scripts/actions/mobskills/whirl_claws.lua | 27 +- scripts/actions/mobskills/whirl_of_rage.lua | 27 +- scripts/actions/mobskills/wild_horn.lua | 31 +- scripts/actions/mobskills/wild_oats.lua | 29 +- scripts/actions/mobskills/wild_rage.lua | 41 +- scripts/actions/mobskills/wing_slap.lua | 32 +- scripts/actions/mobskills/wing_thrust.lua | 34 +- scripts/actions/mobskills/wing_whirl.lua | 31 +- scripts/actions/mobskills/wire_cutter.lua | 27 +- scripts/actions/mobskills/zephyr_arrow.lua | 31 +- scripts/globals/combat/physical_utilities.lua | 43 + scripts/globals/mobskills.lua | 1340 ++++++++++++----- scripts/globals/summon.lua | 6 +- .../packets/s2c/0x028_battle2/beastmaster.lua | 2 +- .../packets/s2c/0x028_battle2/mobskills.lua | 2 +- scripts/tests/systems/targetfind.lua | 4 +- scripts/utils/combat_utils.lua | 91 +- src/map/entities/battleentity.cpp | 7 +- src/map/lua/lua_baseentity.cpp | 7 +- 535 files changed, 10976 insertions(+), 6474 deletions(-) diff --git a/scripts/actions/mobskills/10000_needles.lua b/scripts/actions/mobskills/10000_needles.lua index 8255b4e231a..a87da65cdb2 100644 --- a/scripts/actions/mobskills/10000_needles.lua +++ b/scripts/actions/mobskills/10000_needles.lua @@ -1,6 +1,7 @@ ----------------------------------- -- 10000 Needles --- Description: Shoots multiple needles at enemies within range. +-- Family: Cactuar +-- Description: Shoots multiple needles at enemies within range. Damage is distributed even among all targets hit. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,17 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local needles = 10000 / skill:getTotalTargets() - local info = - { - damage = needles - } + local params = {} - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.LIGHT, xi.mobskills.shadowBehavior.WIPE_SHADOWS) + params.baseDamage = 10000 / skill:getTotalTargets() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.WIPE_SHADOWS + params.guaranteedFirstHit = true + params.skipPDIF = true - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.LIGHT) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/1000_needles.lua b/scripts/actions/mobskills/1000_needles.lua index 9923617aed3..d2aa1ef1974 100644 --- a/scripts/actions/mobskills/1000_needles.lua +++ b/scripts/actions/mobskills/1000_needles.lua @@ -1,6 +1,7 @@ ----------------------------------- --- 1000 Needles --- Description: Shoots multiple needles at enemies within range. +-- 1000 Needles +-- Family: Cactuar +-- Description: Shoots multiple needles at enemies within range. Damage is distributed even among all targets hit. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local needles = 1000 / skill:getTotalTargets() - local info = - { - damage = needles - } - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.LIGHT, xi.mobskills.shadowBehavior.WIPE_SHADOWS) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.LIGHT) + params.baseDamage = 1000 / skill:getTotalTargets() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.WIPE_SHADOWS + params.guaranteedFirstHit = true + params.skipPDIF = true - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/2000_needles.lua b/scripts/actions/mobskills/2000_needles.lua index 3a587710087..e335785dd8f 100644 --- a/scripts/actions/mobskills/2000_needles.lua +++ b/scripts/actions/mobskills/2000_needles.lua @@ -1,6 +1,7 @@ ----------------------------------- -- 2000 Needles --- Description: Shoots multiple needles at enemies within range. +-- Family: Cactuar +-- Description: Shoots multiple needles at enemies within range. Damage is distributed even among all targets hit. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,17 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local needles = 2000 / skill:getTotalTargets() - local info = - { - damage = needles - } + local params = {} - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.LIGHT, xi.mobskills.shadowBehavior.WIPE_SHADOWS) + params.baseDamage = 2000 / skill:getTotalTargets() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.WIPE_SHADOWS + params.guaranteedFirstHit = true + params.skipPDIF = true - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.LIGHT) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/4000_needles.lua b/scripts/actions/mobskills/4000_needles.lua index 99e62cd49d8..1a09292b439 100644 --- a/scripts/actions/mobskills/4000_needles.lua +++ b/scripts/actions/mobskills/4000_needles.lua @@ -1,6 +1,7 @@ ----------------------------------- -- 4000 Needles --- Description: Shoots multiple needles at enemies within range. +-- Family: Cactuar +-- Description: Shoots multiple needles at enemies within range. Damage is distributed even among all targets hit. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,17 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local needles = 4000 / skill:getTotalTargets() - local info = - { - damage = needles - } + local params = {} - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.LIGHT, xi.mobskills.shadowBehavior.WIPE_SHADOWS) + params.baseDamage = 4000 / skill:getTotalTargets() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.WIPE_SHADOWS + params.guaranteedFirstHit = true + params.skipPDIF = true - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.LIGHT) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/abyssal_strike.lua b/scripts/actions/mobskills/abyssal_strike.lua index b127a60831d..42bce3ee1db 100644 --- a/scripts/actions/mobskills/abyssal_strike.lua +++ b/scripts/actions/mobskills/abyssal_strike.lua @@ -1,10 +1,8 @@ ----------------------------------- --- Abyssal Strike --- --- effect: Stun --- Type: Physical --- Notes: zeid and shadows of rage move ----------------------------------------------1 +-- Abyssal Strike +-- Family: Humanoid (Zeid / Shadow of Rage) +-- Description: Deals physical damage. Additional Effect: Stun +----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 2 - local ftp = 4.7 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 4.7, 4.7, 4.7 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT -- TODO: Verify damageType + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 15) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 15) + end - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/acheron_kick.lua b/scripts/actions/mobskills/acheron_kick.lua index f2855497095..a4361e2b25a 100644 --- a/scripts/actions/mobskills/acheron_kick.lua +++ b/scripts/actions/mobskills/acheron_kick.lua @@ -1,11 +1,8 @@ ----------------------------------- --- Acheron Kick --- --- Description: Physical Cone Attack damage behind user. --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows --- Range: Back --- Dark Ixion CAN turn around to use this move on anyone with hate, regardless of their original position or even distance. +-- Acheron Kick +-- Family: Monoceros +-- Description: Deals physical damage in a cone behind the mob. +-- Note: Dark Ixion CAN turn around to use this move on anyone with hate, regardless of their original position or even distance. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,19 +12,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - -- perform physical attack - local numhits = 3 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) + local params = {} - -- if skill hit, apply dmg - if not skill:hasMissMsg() then - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 -- TODO: Confirm if this is 3 hits + params.fTP = { 1, 1, 1 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING -- TODO: Verify damageType + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) end - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/aegis_schism.lua b/scripts/actions/mobskills/aegis_schism.lua index f51d6dbc704..73101002ee0 100644 --- a/scripts/actions/mobskills/aegis_schism.lua +++ b/scripts/actions/mobskills/aegis_schism.lua @@ -1,8 +1,7 @@ ----------------------------------- --- Aegis Schism --- --- Description: Damage varies with TP. Additional effect: defense down --- Type: Physical (Blunt) +-- Aegis Schism +-- Family: Fomor +-- Description: Lowers Defense of target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,20 +10,10 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) return 0 end --- TODO: this doesnt do damage according to jimmy's sheet mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - local power = 75 - local duration = 120 + skill:setMsg(xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.DEFENSE_DOWN, 75, 0, 120)) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.DEFENSE_DOWN, power, 0, duration) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - - return dmg + return xi.effect.DEFENSE_DOWN end return mobskillObject diff --git a/scripts/actions/mobskills/aerial_collision.lua b/scripts/actions/mobskills/aerial_collision.lua index 074afdbc699..44d0b84dc64 100644 --- a/scripts/actions/mobskills/aerial_collision.lua +++ b/scripts/actions/mobskills/aerial_collision.lua @@ -1,6 +1,8 @@ ----------------------------------- -- Aerial Collision --- Description: Cone Attack damage and Defense Down, strips Utsusemi (xi.mobskills.shadowBehavior.WIPE_SHADOWS) +-- Family: Phuabo +-- Description: Deals physical damage in a cone to targets in front of mob. Additional Effect: Defense Down +-- Note: Defense Down effect decays over time. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,19 +12,29 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.NONE, xi.mobskills.shadowBehavior.WIPE_SHADOWS) + local params = {} - -- Inversely scales from 50% to 40% defense down depending on TP - local power = 50 - math.min(10, 5 * math.floor((skill:getTP() - 1000) / 1000)) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1, 1, 1 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.NONE -- TODO: Verify damageType + params.shadowBehavior = xi.mobskills.shadowBehavior.WIPE_SHADOWS - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.DEFENSE_DOWN, power, 0, math.random(45, 75)) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.NONE) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + -- Inversely scales from 50% to 40% defense down depending on TP + -- TODO: This should decay every 2 ticks per Jimmy's spreadsheet + -- -38% ~ -50% defense. Decays every 2 ticks by 10% -> 6% -> 6% -> 4% -> 4% -> 4% and then wears off. Lower durations just end without decaying fully. + local power = 50 - math.min(10, 5 * math.floor((skill:getTP() - 1000) / 1000)) + + xi.mobskills.mobStatusEffectMove(mob, target, skill, xi.effect.DEFENSE_DOWN, power, 0, math.random(45, 75)) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/aerial_wheel.lua b/scripts/actions/mobskills/aerial_wheel.lua index 84a73733d2d..fad1ce028ce 100644 --- a/scripts/actions/mobskills/aerial_wheel.lua +++ b/scripts/actions/mobskills/aerial_wheel.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Aerial Wheel --- Deals a ranged attack to a single target. Additional effect: stun +-- Family: Orc +-- Description: Deals a ranged attack to a single target. Additional effect: stun ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,17 +11,33 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local dmgmod = 1 - local info = xi.mobskills.mobRangedMove(mob, target, skill, numhits, accmod, dmgmod, xi.mobskills.magicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.RANGED, xi.damageType.PIERCING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.RANGED, xi.damageType.PIERCING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.skipParry = true + params.skipGuard = true + params.skipBlock = true - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 4) + local info = xi.mobskills.mobRangedMove(mob, target, skill, action, params) - return dmg + -- Distance-based damage scaling: 1x at 1 yalm, 3x at 10 yalms + -- TODO: Determine max distance of skill + local distance = mob:checkDistance(target) + local distanceMultiplier = utils.clamp(1 + (distance - 1) * 2 / 9, 1, 3) + info.damage = info.damage * distanceMultiplier + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) -- TODO: Capture stun duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/agaricus.lua b/scripts/actions/mobskills/agaricus.lua index 3c4954fa430..40996e0cccd 100644 --- a/scripts/actions/mobskills/agaricus.lua +++ b/scripts/actions/mobskills/agaricus.lua @@ -1,10 +1,7 @@ ----------------------------------- -- Agaricus --- Deals damage to a single target. --- Type: Physical --- Can be dispelled: N/A --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Family: Funguar +-- Description: Deals physical damage to a single target. Additional Effect: Plague, Slow ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,16 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, 1, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.PLAGUE, 5, 0, 60) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.SLOW, 2500, 0, 120) -- TODO: Verify slow chance and duration + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3, 3, 3 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PLAGUE, 5, 0, 60) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.SLOW, 2500, 0, 120) -- TODO: Verify slow chance and duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/alabaster_burst.lua b/scripts/actions/mobskills/alabaster_burst.lua index 1281243f405..d224d9d8fe4 100644 --- a/scripts/actions/mobskills/alabaster_burst.lua +++ b/scripts/actions/mobskills/alabaster_burst.lua @@ -1,5 +1,6 @@ ----------------------------------- -- Alabaster Burst +-- Family: Humanoid (August) ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -9,21 +10,30 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 2 - local accmod = 3 - local dmgmod = 4 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, dmgmod, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - - local duration = (skill:getTP() / 100) / 6 -- 2 sec min, 5 sec max - if duration < 2 then - duration = 2 - end + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 2 + params.fTP = { 4.0, 4.0, 4.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) - xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.FLASH, 1, 0, duration) + local duration = (skill:getTP() / 100) / 6 -- 2 sec min, 5 sec max + + if duration < 2 then + duration = 2 + end + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.FLASH, 1, 0, duration) + end - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/amatsu_hanaikusa.lua b/scripts/actions/mobskills/amatsu_hanaikusa.lua index cc73dd8c108..5edd7800450 100644 --- a/scripts/actions/mobskills/amatsu_hanaikusa.lua +++ b/scripts/actions/mobskills/amatsu_hanaikusa.lua @@ -1,6 +1,7 @@ ----------------------------------- --- Amatsu: Hanaikusa --- Type: Physical +-- Amatsu: Hanaikusa +-- Family: Humanoid (Tenzen) +-- Description: Deals physical damage to a target. Additional Effect: Paralysis ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,19 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local power = 22.5 - local duration = 60 - local numhits = 1 - local accmod = 2 - local ftp = 6 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 6, 6, 6 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.PARALYSIS, power, 0, duration) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PARALYSIS, 22, 0, 60) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/amatsu_kazakiri.lua b/scripts/actions/mobskills/amatsu_kazakiri.lua index 14c4d5c00f3..ffebab1de8e 100644 --- a/scripts/actions/mobskills/amatsu_kazakiri.lua +++ b/scripts/actions/mobskills/amatsu_kazakiri.lua @@ -1,6 +1,7 @@ ----------------------------------- --- Amatsu: Kazakiri --- Type: Physical +-- Amatsu: Kazakiri +-- Family: Humanoid (Tenzen) +-- Description: Deals physical damage to a target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,15 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 2 - local accmod = 2 - local ftp = 4.5 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 2 + params.fTP = { 4.5, 4.5, 4.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/amatsu_torimai.lua b/scripts/actions/mobskills/amatsu_torimai.lua index 9e6ccb81eaf..35dc6c9fe7a 100644 --- a/scripts/actions/mobskills/amatsu_torimai.lua +++ b/scripts/actions/mobskills/amatsu_torimai.lua @@ -1,6 +1,7 @@ ----------------------------------- --- Amatsu: Torimai --- Type: Physical +-- Amatsu: Torimai +-- Description: Humanoid (Tenzen) +-- Description: Deals physical damage to a target ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,15 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 2 - local accmod = 1 - local ftp = 4 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 2 + params.fTP = { 4.0, 4.0, 4.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/amatsu_tsukikage.lua b/scripts/actions/mobskills/amatsu_tsukikage.lua index 7a8b7a126a5..80b1b974c3a 100644 --- a/scripts/actions/mobskills/amatsu_tsukikage.lua +++ b/scripts/actions/mobskills/amatsu_tsukikage.lua @@ -1,6 +1,7 @@ ----------------------------------- --- Amatsu: Tsukikage --- Type: Physical +-- Amatsu: Tsukikage +-- Family: Humanoid (Tenzen) +-- Description: Deals physical damage to a target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,15 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 2 - local ftp = 3.5 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 3.5, 3.5, 3.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 -- TODO: Capture shadowBehavior - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/amatsu_tsukioboro.lua b/scripts/actions/mobskills/amatsu_tsukioboro.lua index 741c2aa3124..d2d20cb5d72 100644 --- a/scripts/actions/mobskills/amatsu_tsukioboro.lua +++ b/scripts/actions/mobskills/amatsu_tsukioboro.lua @@ -1,6 +1,7 @@ ----------------------------------- --- Amatsu: Tsukioboro --- Type: Physical +-- Amatsu: Tsukioboro +-- Family: Humanoid (Tenzen) +-- Description: Deals physical damage to a target. Additional Effect: Silence ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,19 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local power = 1 - local duration = 60 - local numhits = 1 - local accmod = 1 - local ftp = 4 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 4.0, 4.0, 4.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.SILENCE, power, 0, duration) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.SILENCE, 1, 0, 60) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/amatsu_yukiarashi.lua b/scripts/actions/mobskills/amatsu_yukiarashi.lua index 7e4907fb28c..fe0013a3c5d 100644 --- a/scripts/actions/mobskills/amatsu_yukiarashi.lua +++ b/scripts/actions/mobskills/amatsu_yukiarashi.lua @@ -1,6 +1,7 @@ ----------------------------------- --- Amatsu Yukiarashi --- Type: Physical +-- Amatsu Yukiarashi +-- Family: Humanoid (Tenzen) +-- Description: Deals physical damage to a target. Additional Effect: Blind ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,19 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local power = 1 - local duration = 60 - local numhits = 1 - local accmod = 2 - local ftp = 6 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 6.0, 6.0, 6.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BLINDNESS, power, 0, duration) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BLINDNESS, 1, 0, 60) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/amon_drive.lua b/scripts/actions/mobskills/amon_drive.lua index 505e664c48c..95a25109909 100644 --- a/scripts/actions/mobskills/amon_drive.lua +++ b/scripts/actions/mobskills/amon_drive.lua @@ -1,11 +1,8 @@ ----------------------------------- -- Amon Drive --- --- Description: Performs an area of effect weaponskill. Additional effect: Paralysis + Petrification + Poison --- Type: Physical --- 2-3 Shadows? --- Range: Melee range radial --- Special weaponskill unique to Ark Angel TT. Deals ~100-400 damage. +-- Family: Humanoid (AA TaruTaru) +-- Description: Performs an area of effect weaponskill. Additional Effect: Paralysis, Petrification, Poison +-- Notes: Special weaponskill unique to Ark Angel TT. Deals ~100-400 damage. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,18 +12,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_3) - - xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PARALYSIS, 25, 0, 60) - xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PETRIFICATION, 1, 0, math.random(8, 15) + mob:getMainLvl() / 3) - xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.POISON, math.ceil(mob:getMainLvl() / 5), 3, 60) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.5, 2.5, 2.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PARALYSIS, 25, 0, 60) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PETRIFICATION, 1, 0, math.random(8, 15) + mob:getMainLvl() / 3) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.POISON, math.ceil(mob:getMainLvl() / 5), 3, 60) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/amorphic_scythe.lua b/scripts/actions/mobskills/amorphic_scythe.lua index 5d873cc614d..aaa7e8a9ca0 100644 --- a/scripts/actions/mobskills/amorphic_scythe.lua +++ b/scripts/actions/mobskills/amorphic_scythe.lua @@ -1,10 +1,7 @@ ----------------------------------- -- Amorphic Scythe --- +-- Family: Flan -- Description: Strikes all targets in front. --- Type: Physical --- Utsusemi/Blink absorb: 2 shadows --- Range: Front Conal ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,15 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 2 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 2 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 -- TODO: Capture shadowBehavior - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/amorphic_spikes.lua b/scripts/actions/mobskills/amorphic_spikes.lua index 33ebd57f0a2..410b0cf2270 100644 --- a/scripts/actions/mobskills/amorphic_spikes.lua +++ b/scripts/actions/mobskills/amorphic_spikes.lua @@ -1,10 +1,7 @@ ----------------------------------- -- Amorphic Spikes --- +-- Family: Flan -- Description: Delivers a fivefold attack. Damage varies with TP. --- Type: Physical --- Utsusemi/Blink absorb: 5 shadows --- Range: Unknown ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,15 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 5 - local accmod = 1 - local ftp = 0.6 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 5 + params.fTP = { 0.6, 0.6, 0.6 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_5 - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/antigravity.lua b/scripts/actions/mobskills/antigravity.lua index 03afa0c30e2..ec8750d0af2 100644 --- a/scripts/actions/mobskills/antigravity.lua +++ b/scripts/actions/mobskills/antigravity.lua @@ -1,7 +1,8 @@ ----------------------------------- -- Antigravity --- Always single gear --- Knockback and damage, knockback varies with gear count +-- Family: Gear (Single Gear) +-- Description: Deals Light damage to targets in range. Additional Effect: Knockback +-- Note: Used by Gears that spawn with only a single gear, not the model with 3 gears. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,15 +12,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, xi.mobskills.shadowBehavior.WIPE_SHADOWS) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) + params.baseDamage = mob:getMainLvl() + 2 + params.fTP = { 2.0, 2.0, 2.0 } + params.element = xi.element.LIGHT + params.attackType = xi.attackType.MAGICAL + params.damageType = xi.damageType.LIGHT + params.shadowBehavior = xi.mobskills.shadowBehavior.WIPE_SHADOWS + params.dStatMultiplier = 1 - return dmg + local info = xi.mobskills.mobMagicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/antigravity_1.lua b/scripts/actions/mobskills/antigravity_1.lua index 02946e727d3..830f5fb0033 100644 --- a/scripts/actions/mobskills/antigravity_1.lua +++ b/scripts/actions/mobskills/antigravity_1.lua @@ -1,10 +1,7 @@ ----------------------------------- --- Antigravity w/ 1 Gear --- Knockback and damage, knockback varies with gear count ------------------------------------ --- TODO: The potency of the knockback effect varies with --- the number of gears in the enemy formation. A single gear produces only a --- slight knockback, whereas triple gears produce a very strong knockback. +-- Antigravity (1 Gear) +-- Family: Gears (1/3) +-- Description: Deals Light damage to targets in range. Additional Effect: Knockback ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,15 +11,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, xi.mobskills.shadowBehavior.WIPE_SHADOWS) + local params = {} + + params.baseDamage = mob:getMainLvl() + 2 + params.fTP = { 2.0, 2.0, 2.0 } + params.element = xi.element.LIGHT + params.attackType = xi.attackType.MAGICAL + params.damageType = xi.damageType.LIGHT + params.shadowBehavior = xi.mobskills.shadowBehavior.WIPE_SHADOWS + params.dStatMultiplier = 1 + + local info = xi.mobskills.mobMagicalMove(mob, target, skill, action, params) - target:delHP(dmg) + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/antigravity_2.lua b/scripts/actions/mobskills/antigravity_2.lua index e09a5ed54fd..978f5bec392 100644 --- a/scripts/actions/mobskills/antigravity_2.lua +++ b/scripts/actions/mobskills/antigravity_2.lua @@ -1,10 +1,7 @@ ----------------------------------- --- Antigravity w / 2 Gears --- Knockback and damage, knockback varies with gear count ------------------------------------ --- TODO: The potency of the knockback effect varies with --- the number of gears in the enemy formation. A single gear produces only a --- slight knockback, whereas triple gears produce a very strong knockback. +-- Antigravity (2 Gears) +-- Family: Gears (2/3) +-- Description: Deals Light damage to targets in range. Additional Effect: Knockback ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,15 +11,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, xi.mobskills.shadowBehavior.WIPE_SHADOWS) + local params = {} + + params.baseDamage = mob:getMainLvl() + 2 + params.fTP = { 2.0, 2.0, 2.0 } + params.element = xi.element.LIGHT + params.attackType = xi.attackType.MAGICAL + params.damageType = xi.damageType.LIGHT + params.shadowBehavior = xi.mobskills.shadowBehavior.WIPE_SHADOWS + params.dStatMultiplier = 1 + + local info = xi.mobskills.mobMagicalMove(mob, target, skill, action, params) - target:delHP(dmg) + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/antigravity_3.lua b/scripts/actions/mobskills/antigravity_3.lua index 1daa85bd07d..247e9deb8f1 100644 --- a/scripts/actions/mobskills/antigravity_3.lua +++ b/scripts/actions/mobskills/antigravity_3.lua @@ -1,6 +1,7 @@ ----------------------------------- --- Antigravity w/ 3 Gears --- Knockback and damage, knockback varies with gear count +-- Antigravity (3 Gears) +-- Family: Gears (3/3) +-- Description: Deals Light damage to targets in range. Additional Effect: Knockback ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,15 +11,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, xi.mobskills.shadowBehavior.WIPE_SHADOWS) + local params = {} - target:delHP(dmg) + params.baseDamage = mob:getMainLvl() + 2 + params.fTP = { 2.0, 2.0, 2.0 } + params.element = xi.element.LIGHT + params.attackType = xi.attackType.MAGICAL + params.damageType = xi.damageType.LIGHT + params.shadowBehavior = xi.mobskills.shadowBehavior.WIPE_SHADOWS + params.dStatMultiplier = 1 - return dmg + local info = xi.mobskills.mobMagicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/arbor_storm.lua b/scripts/actions/mobskills/arbor_storm.lua index 7385f6d199c..0bc46ec2074 100644 --- a/scripts/actions/mobskills/arbor_storm.lua +++ b/scripts/actions/mobskills/arbor_storm.lua @@ -1,8 +1,6 @@ --- Arbor Storm --- Description: Deals physical damage to enemies in a 10'area. Additional effect: Gravity, Knockback --- Type: Physical --- Utsusemi/Blink absorb: 3 Shadows --- Range: 10' AOE +-- Arbor Storm +-- Family: Treant +-- Description: Deals physical damage to enemies in a 10'area. Additional Effect: Gravity, Knockback ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,14 +10,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, xi.mobskills.shadowBehavior.NUMSHADOWS_3) - - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.WEIGHT, 75, 0, 60) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING -- TODO: Capture damageType + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.WEIGHT, 75, 0, 60) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/arching_arrow.lua b/scripts/actions/mobskills/arching_arrow.lua index b8e66c33307..780b991b052 100644 --- a/scripts/actions/mobskills/arching_arrow.lua +++ b/scripts/actions/mobskills/arching_arrow.lua @@ -1,9 +1,10 @@ ----------------------------------- -- Arching Arrow --- Trust: Semih Lafihna --- Delivers a single-hit attack. Chance of critical varies with TP. +-- Family: Humanoid Archery Weaponskill +-- Description: Delivers a single-hit attack. Chance of critical varies with TP. -- Modifiers: STR:20%; AGI:50% -- Darkness/Gravitation skillchain properties, AoE damage +-- Notes: Used by Trust: Semih Lafihna ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,15 +14,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.RANGED, xi.damageType.PIERCING, xi.mobskills.shadowBehavior.NUMSHADOWS_1) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.RANGED, xi.damageType.PIERCING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.5, 3.5, 3.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 -- TODO: Capture shadowBehavior + params.skipParry = true + params.skipGuard = true + params.skipBlock = true - return dmg + local info = xi.mobskills.mobRangedMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/arrow_deluge.lua b/scripts/actions/mobskills/arrow_deluge.lua index f562c48df0b..bc390a4a2c3 100644 --- a/scripts/actions/mobskills/arrow_deluge.lua +++ b/scripts/actions/mobskills/arrow_deluge.lua @@ -1,15 +1,13 @@ ----------------------------------- --- Arrow Deluge --- Description: Delivers a threefold ranged attack to targets in an area of effect. --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows --- Range: Unknown +-- Arrow Deluge +-- Family: Lamia +-- Description: Delivers an AoE ranged attack. ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - if mob:getAnimationSub() ~= 1 and mob:getMainJob() == xi.job.RNG then + if mob:getAnimationSub() ~= 1 and mob:getMainJob() == xi.job.RNG then -- TODO: Set skill lists return 0 else return 1 @@ -17,15 +15,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.RANGED, xi.damageType.PIERCING, xi.mobskills.shadowBehavior.NUMSHADOWS_3) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.RANGED, xi.damageType.PIERCING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadow Behavior + params.skipParry = true + params.skipGuard = true + params.skipBlock = true + -- TODO: This is a 14' conal AoE centered on the primary target, not the mob. - return dmg + local info = xi.mobskills.mobRangedMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/ascetics_fury.lua b/scripts/actions/mobskills/ascetics_fury.lua index 8e4aa7b6d60..bec96d46441 100644 --- a/scripts/actions/mobskills/ascetics_fury.lua +++ b/scripts/actions/mobskills/ascetics_fury.lua @@ -1,7 +1,7 @@ ----------------------------------- -- Ascetics Fury +-- Family: Humanoid Hand to Hand Weaponskill -- Description: Hand To Hand Weapon Skill --- Type: Physical ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,15 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.6 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.CRIT_VARIES, 1.1, 1.3, 1.5) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.HTH, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.HTH) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.6, 2.6, 2.6 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.HTH + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 -- TODO: Capture shadowBehavior + params.canCrit = true + params.criticalChance = { 0.1, 0.3, 0.5 } -- TODO: Capture actual crit rate - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/astral_gate.lua b/scripts/actions/mobskills/astral_gate.lua index 74e30ea5725..3c42a0e7683 100644 --- a/scripts/actions/mobskills/astral_gate.lua +++ b/scripts/actions/mobskills/astral_gate.lua @@ -1,17 +1,14 @@ ----------------------------------- -- Astral Gate --- Only used by Ramparts when its door is open --- Description: Description: Cone damage and knockback --- Type: Magical --- Utsusemi/Blink absorb: 3 shadows --- Range: 7' +-- Family: Rampart +-- Description: Deals conal AoE damage to targets in front of mob. Additional Effect: Knockback ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - if mob:getAnimationSub() == 1 then + if mob:getAnimationSub() == 1 then -- Only used when door is open return 0 end @@ -19,15 +16,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/asuran_claws.lua b/scripts/actions/mobskills/asuran_claws.lua index 3b03fd2b2d6..90e9deaaafa 100644 --- a/scripts/actions/mobskills/asuran_claws.lua +++ b/scripts/actions/mobskills/asuran_claws.lua @@ -1,12 +1,13 @@ ----------------------------------- -- Asuran Claws --- Gnole Mobs, only used when standing +-- Family: Gnoles +-- Description: Delivers a six fold attack. ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - -- animsub 1= standing, animsub 0 = all fours + -- animsub 1 = standing, animsub 0 = all fours if mob:getAnimationSub() == 0 then return 1 end @@ -15,15 +16,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 6 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 6 + params.fTP = { 0.8, 0.8, 0.8 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_6 - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/asuran_fists.lua b/scripts/actions/mobskills/asuran_fists.lua index 2fc661c0585..9f5b17c1f16 100644 --- a/scripts/actions/mobskills/asuran_fists.lua +++ b/scripts/actions/mobskills/asuran_fists.lua @@ -1,7 +1,7 @@ ----------------------------------- -- Asuran Fists +-- Family: Humanoid Hand to Hand Weaponskill -- Description: Delivers an eightfold attack. Accuracy varies with TP. --- Type: Physical ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -16,15 +16,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 8 - local accmod = 1 - local ftp = 0.8 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.HTH, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.HTH) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 8 + params.fTP = { 0.8, 0.8, 0.8 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.HTH + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_8 - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/august_melee_axe.lua b/scripts/actions/mobskills/august_melee_axe.lua index 1156a412d01..00fa4c47e49 100644 --- a/scripts/actions/mobskills/august_melee_axe.lua +++ b/scripts/actions/mobskills/august_melee_axe.lua @@ -1,5 +1,7 @@ ----------------------------------- --- August Melee - Axe +-- August Melee - Axe +-- Family: Humanoid (August) +-- Description: August's axe autoattack. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -9,19 +11,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 4 - local dmgmod = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, dmgmod, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - skill:setMsg(xi.msg.basic.HIT_DMG) + local params = {} - if info.hitslanded == 0 then - skill:setMsg(xi.msg.basic.HIT_MISS) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 -- TODO: Capture shadowBehavior + params.primaryMessage = xi.msg.basic.HIT_DMG + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) end - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/august_melee_bow.lua b/scripts/actions/mobskills/august_melee_bow.lua index 596a684236d..2aa6815510d 100644 --- a/scripts/actions/mobskills/august_melee_bow.lua +++ b/scripts/actions/mobskills/august_melee_bow.lua @@ -9,19 +9,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 4 - local dmgmod = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, dmgmod, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.RANGED, xi.damageType.PIERCING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.RANGED, xi.damageType.PIERCING) - skill:setMsg(xi.msg.basic.HIT_DMG) + local params = {} - if info.hitslanded == 0 then - skill:setMsg(xi.msg.basic.HIT_MISS) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 -- TODO: Capture shadowBehavior + params.primaryMessage = xi.msg.basic.HIT_DMG + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) end - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/august_melee_h2h.lua b/scripts/actions/mobskills/august_melee_h2h.lua index 7e791bdec49..367f41f9efe 100644 --- a/scripts/actions/mobskills/august_melee_h2h.lua +++ b/scripts/actions/mobskills/august_melee_h2h.lua @@ -9,19 +9,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 4 - local dmgmod = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, dmgmod, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - skill:setMsg(xi.msg.basic.HIT_DMG) + local params = {} - if info.hitslanded == 0 then - skill:setMsg(xi.msg.basic.HIT_MISS) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT -- TODO: Capture damageType + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 -- TODO: Capture shadowBehavior + params.primaryMessage = xi.msg.basic.HIT_DMG + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) end - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/august_melee_sword.lua b/scripts/actions/mobskills/august_melee_sword.lua index cc730586ad1..39e9d2e824e 100644 --- a/scripts/actions/mobskills/august_melee_sword.lua +++ b/scripts/actions/mobskills/august_melee_sword.lua @@ -9,19 +9,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 2 - local accmod = 4 - local dmgmod = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, dmgmod, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - skill:setMsg(xi.msg.basic.HIT_DMG) + local params = {} - if info.hitslanded == 0 then - skill:setMsg(xi.msg.basic.HIT_MISS) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 -- TODO: Capture shadowBehavior + params.primaryMessage = xi.msg.basic.HIT_DMG + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) end - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/auto_attack_geush.lua b/scripts/actions/mobskills/auto_attack_geush.lua index f8628e9bddc..f6bae889dbd 100644 --- a/scripts/actions/mobskills/auto_attack_geush.lua +++ b/scripts/actions/mobskills/auto_attack_geush.lua @@ -1,8 +1,9 @@ ----------------------------------- -- Geush Urvan Auto Attack --- Deals damage to a single target. Additional effect: Knockback but only on hit. +-- Family: Buffalo +-- Description: Deals damage to a single target. Additional Effect: Knockback -- Used by Geush Urvan in Uleguerand Range. --- To do: Make knockback only apply on successful hit. +-- Notes: Knockback only applies on hit. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,20 +13,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 8.0 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, xi.mobskills.shadowBehavior.WIPE_SHADOWS) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) + local params = {} - if dmg > 0 then - skill:setMsg(xi.msg.basic.HIT_DMG) - else - skill:setMsg(xi.msg.basic.HIT_MISS) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 8.0, 8.0, 8.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.WIPE_SHADOWS + params.primaryMessage = xi.msg.basic.HIT_DMG + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) end - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/auto_attack_shantotto_ii.lua b/scripts/actions/mobskills/auto_attack_shantotto_ii.lua index a9d5642827b..5dc28e50264 100644 --- a/scripts/actions/mobskills/auto_attack_shantotto_ii.lua +++ b/scripts/actions/mobskills/auto_attack_shantotto_ii.lua @@ -18,6 +18,8 @@ mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) params.damageType = xi.damageType.NONE params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS -- TODO: Capture shadowBehavior params.primaryMessage = xi.msg.basic.HIT_DMG + -- Note: Element might be adaptive to target weakness. + -- Using Shantotto II vs ROV Siren, the auto attacks were healing the mob(Siren absorbs Wind element damage). local info = xi.mobskills.mobMagicalMove(mob, target, skill, action, params) diff --git a/scripts/actions/mobskills/axe_kick.lua b/scripts/actions/mobskills/axe_kick.lua index 455e1d47ed8..06d9f821bd3 100644 --- a/scripts/actions/mobskills/axe_kick.lua +++ b/scripts/actions/mobskills/axe_kick.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Axe Kick --- Shiva delivers a single-hit blunt attack on target +-- Family: Avatar (Shiva) +-- Description: Shiva delivers a single-hit blunt attack on target ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,15 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 1, 2, 3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.5, 3.5, 3.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/axe_throw.lua b/scripts/actions/mobskills/axe_throw.lua index 23f2e5ac0f1..aa51ecf9934 100644 --- a/scripts/actions/mobskills/axe_throw.lua +++ b/scripts/actions/mobskills/axe_throw.lua @@ -1,18 +1,15 @@ ----------------------------------- --- Axe Throw --- --- Description: Ranged attack with the equipped weapon, which is lost. --- Type: Ranged --- Utsusemi/Blink absorb: 1 shadow --- Range: 7.0 --- Notes: Only used by armed BST Mamool Ja +-- Axe Throw +-- Family: Mamool Ja +-- Description: Ranged attack with the equipped weapon, which is lost afterwards. +-- Notes: Only used by armed BST Mamool Ja ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) -- If animationSub is non-zero, mob has already lost the weapon. - if mob:getAnimationSub() == 0 and mob:getMainJob() == xi.job.BST then + if mob:getAnimationSub() == 0 and mob:getMainJob() == xi.job.BST then -- TODO: Set proper skill lists return 0 end @@ -20,16 +17,27 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - skill:setFinalAnimationSub(2) - local numhits = 1 - local accmod = 1 - local dmgmod = 1 - local info = xi.mobskills.mobRangedMove(mob, target, skill, numhits, accmod, dmgmod, xi.mobskills.physicalTpBonus.ACC_VARIES) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.RANGED, xi.damageType.SLASHING, info.hitslanded) + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.RANGED + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.skipParry = true + params.skipGuard = true + params.skipBlock = true + + local info = xi.mobskills.mobRangedMove(mob, target, skill, action, params) - target:takeDamage(dmg, mob, xi.attackType.RANGED, xi.damageType.SLASHING) + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + skill:setFinalAnimationSub(2) - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/back_heel.lua b/scripts/actions/mobskills/back_heel.lua index 261ad9ffc2b..f54a8bd7b9d 100644 --- a/scripts/actions/mobskills/back_heel.lua +++ b/scripts/actions/mobskills/back_heel.lua @@ -1,11 +1,7 @@ ----------------------------------- -- Back Heel -- Family: Hippogryph --- Description: Deals damage to a single target. --- Type: Physical --- Utsusemi/Blink absorb: One shadow --- Range: Melee --- Notes: +-- Description: Deals damage to a single target. Additional Effect: Knockback ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,14 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/back_swish.lua b/scripts/actions/mobskills/back_swish.lua index dcdd73770ac..c63a57a74f2 100644 --- a/scripts/actions/mobskills/back_swish.lua +++ b/scripts/actions/mobskills/back_swish.lua @@ -1,11 +1,7 @@ ----------------------------------- --- Back Swish --- --- Description: Inflicts damage in a frontal area of effect. Additional effect: Knockback. --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows --- Range: Melee --- Notes: +-- Back Swish +-- Family: Tauri +-- Description: Inflicts damage in a frontal area of effect. Additional Effect: Knockback. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,14 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded * math.random(2, 3)) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/barbed_crescent.lua b/scripts/actions/mobskills/barbed_crescent.lua index f7bb2941b48..e3e2cf1190a 100644 --- a/scripts/actions/mobskills/barbed_crescent.lua +++ b/scripts/actions/mobskills/barbed_crescent.lua @@ -1,9 +1,8 @@ ----------------------------------- -- Barbed Crescent --- Slashing damage varies with TP. Additional effect: Accuracy Down. +-- Family: Fomor +-- Description: Slashing damage varies with TP. Additional Effect: Accuracy Down. -- Area of Effect is centered around caster. --- The Additional Effect: Accuracy Down may not always process. --- Duration: Three minutes ? ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,16 +12,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.ACCURACY_DOWN, 100, 0, 180) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.ACCURACY_DOWN, 100, 0, 180) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/barracuda_dive.lua b/scripts/actions/mobskills/barracuda_dive.lua index 752cee49d55..6cbd454473f 100644 --- a/scripts/actions/mobskills/barracuda_dive.lua +++ b/scripts/actions/mobskills/barracuda_dive.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Barracuda Dive --- Leviathan delivers a single-hit attack on target. +-- Family: Avatar (Leviathan) +-- Description: Leviathan delivers a single-hit attack on target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 2 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 1, 2, 3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/batterhorn.lua b/scripts/actions/mobskills/batterhorn.lua index 7e3e45868e2..b70c0204ccb 100644 --- a/scripts/actions/mobskills/batterhorn.lua +++ b/scripts/actions/mobskills/batterhorn.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Batterhorn --- Description: Inflicts damage in a frontal area of effect. Additional effect: Knockback. --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows --- Range: Melee +-- Batterhorn +-- Family: Wivre +-- Description: Inflicts damage in a frontal area of effect. Additional Effect: Knockback. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -17,13 +15,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = .8 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/battle_dance.lua b/scripts/actions/mobskills/battle_dance.lua index 084e97b3310..8f8c3a65c1e 100644 --- a/scripts/actions/mobskills/battle_dance.lua +++ b/scripts/actions/mobskills/battle_dance.lua @@ -1,7 +1,8 @@ ----------------------------------- --- Battle Dance --- Description: Delivers an area attack. Additional effect: DEX Down. Duration of effect varies with TP. --- Type: Physical (Slashing) +-- Battle Dance +-- Family: Orc +-- Description: Delivers an area attack. Additional Effect: DEX Down +-- Note: Used by melee orcs ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,16 +12,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_3) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.DEX_DOWN, 10, 3, 180) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } -- TODO: Capture fTP Scalings + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_4 - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.DEX_DOWN, 10, 9, 180) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/beak_lunge.lua b/scripts/actions/mobskills/beak_lunge.lua index ef1eb117336..30a27bec4d1 100644 --- a/scripts/actions/mobskills/beak_lunge.lua +++ b/scripts/actions/mobskills/beak_lunge.lua @@ -1,11 +1,7 @@ ----------------------------------- --- Beak Lunge --- --- Description: Dives beak-first into a single target. Additional effect: Knockback --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee --- Notes: +-- Beak Lunge +-- Family: Apkallu +-- Description: Dives beak-first into a single target. Additional effect: Knockback ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/bear_killer.lua b/scripts/actions/mobskills/bear_killer.lua index 1e9aa61d6ed..a3332282b7c 100644 --- a/scripts/actions/mobskills/bear_killer.lua +++ b/scripts/actions/mobskills/bear_killer.lua @@ -1,7 +1,7 @@ ----------------------------------- -- Bear Killer +-- Family: Humanoid (Maat) -- Description: Damage varies with TP. --- Type: Physical ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,14 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 1 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.HTH, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.HTH) - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.HTH + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/beatdown.lua b/scripts/actions/mobskills/beatdown.lua index 5791a690659..42781d148eb 100644 --- a/scripts/actions/mobskills/beatdown.lua +++ b/scripts/actions/mobskills/beatdown.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Beatdown --- Deals damage to a single target. Additional effect: bind +-- Family: Goobbue +-- Description: Deals damage to a single target. Additional Effect: Bind ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,16 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ATK_VARIES, 2, 2, 2) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BIND, 1, 0, 60) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.attackMultiplier = { 2.0, 2.0, 2.0 } - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIND, 1, 0, 60) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/benthic_typhoon.lua b/scripts/actions/mobskills/benthic_typhoon.lua index ca54094b8b3..8415f2f4855 100644 --- a/scripts/actions/mobskills/benthic_typhoon.lua +++ b/scripts/actions/mobskills/benthic_typhoon.lua @@ -1,7 +1,7 @@ ----------------------------------- --- Benthic Typhoon --- Description: Delivers an area attack that lowers target's defense and magic defense. Damage varies with TP. --- Type: Physical (Piercing) +-- Benthic Typhoon +-- Family: Voragean +-- Description: Delivers an area attack. Additional Effect: Defense Down, Magic DEF Down ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,19 +10,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) return 0 end --- fTP and fTP scaling unknown. TODO: capture ftp mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.MAGIC_DEF_DOWN, 30, 0, 60) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.DEFENSE_DOWN, 30, 0, 60) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.3, 2.3, 2.3 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.MAGIC_DEF_DOWN, 30, 0, 60) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.DEFENSE_DOWN, 30, 0, 60) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/big_horn.lua b/scripts/actions/mobskills/big_horn.lua index 59088c98310..9757f06ee6c 100644 --- a/scripts/actions/mobskills/big_horn.lua +++ b/scripts/actions/mobskills/big_horn.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Big Horn --- Deals damage to a single target. +-- Family: Buffalo +-- Description: Deals damage to a single target. Additional Effect: Knockback ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,13 +11,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 -- TODO: Capture shadowBehavior + params.attackMultiplier = { 1.5, 1.5, 1.5 } + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/big_scissors.lua b/scripts/actions/mobskills/big_scissors.lua index a94d785fd3d..54f3542e82d 100644 --- a/scripts/actions/mobskills/big_scissors.lua +++ b/scripts/actions/mobskills/big_scissors.lua @@ -1,6 +1,8 @@ ----------------------------------- --- Big Scissors: Deals damage to a single target. --- Nightmare Crabs ignore shadows +-- Big Scissors +-- Family: Crab +-- Description: Deals damage to a single target. +-- Note: Nightmare Crabs ignore shadows ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -9,15 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) return 0 end --- TODO: nightmare crabs ignore shadows mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + -- TODO: Nightmare Crab - Ignores shadows + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/bilgestorm.lua b/scripts/actions/mobskills/bilgestorm.lua index 7251c06f29b..823b13126b2 100644 --- a/scripts/actions/mobskills/bilgestorm.lua +++ b/scripts/actions/mobskills/bilgestorm.lua @@ -1,11 +1,8 @@ ----------------------------------- --- Bilgestorm --- --- Description: Deals damage in an area of effect. Additional effect: Lowers attack, accuracy, and defense --- Type: Physical --- Utsusemi/Blink absorb: Wipes shadows --- Range: Unknown --- Notes: Only used at low health.*Experienced the use at 75%* +-- Bilgestorm +-- Family: Dvergr +-- Description: Deals damage in an area of effect. Additional effect: Lowers attack, accuracy, and defense +-- Notes: Only used at low health.*Experienced the use at 75%* ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,19 +12,27 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local power = math.random(20, 25) - - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.ACCURACY_DOWN, power, 0, 60) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.ATTACK_DOWN, power, 0, 60) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.DEFENSE_DOWN, power, 0, 60) - - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, xi.mobskills.shadowBehavior.WIPE_SHADOWS) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + -- TODO: Capture skill. Magic or Physical? shadowBehavior, fTPs, status effects, etc + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.WIPE_SHADOWS + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.ACCURACY_DOWN, math.random(20, 25), 0, 60) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.ATTACK_DOWN, math.random(20, 25), 0, 60) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.DEFENSE_DOWN, math.random(20, 25), 0, 60) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/biotic_boomerang.lua b/scripts/actions/mobskills/biotic_boomerang.lua index 4df1d5b059f..57cc620b36e 100644 --- a/scripts/actions/mobskills/biotic_boomerang.lua +++ b/scripts/actions/mobskills/biotic_boomerang.lua @@ -1,7 +1,7 @@ ----------------------------------- -- Biotic Boomerang --- Aern (BST & WAR) --- Blinkable 2-3 hit, addtional effect plague on hit. +-- Family: Aern (BST & WAR) +-- Description: Deals physical damage to a targets near mob. Addtional Effect: Plague ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,18 +11,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = math.random(2, 3) - local accmod = 1 - local ftp = 2 + local params = {} - -- TODO: Need crit scaling captures - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.CRIT_VARIES, 1, 1, 1) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.PLAGUE, 18, 3, math.random(30, 60)) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PLAGUE, 5, 3, math.random(30, 60)) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/black_halo.lua b/scripts/actions/mobskills/black_halo.lua index 850569bad8b..0fb2f3f2e4c 100644 --- a/scripts/actions/mobskills/black_halo.lua +++ b/scripts/actions/mobskills/black_halo.lua @@ -1,28 +1,34 @@ ----------------------------------- -- Black Halo --- +-- Family: Humanoid Club Weaponskill -- Description: Delivers a twofold attack. Damage varies with TP. --- Type: Physical --- Utsusemi/Blink absorb: Shadow per hit --- Range: Melee ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) mob:messageBasic(xi.msg.basic.READIES_WS, 0, 169) + return 0 end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 2 - local accmod = 1 - local ftp = 2.0 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 2 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/blade_jin.lua b/scripts/actions/mobskills/blade_jin.lua index 91912270183..6189c37e9d6 100644 --- a/scripts/actions/mobskills/blade_jin.lua +++ b/scripts/actions/mobskills/blade_jin.lua @@ -1,23 +1,36 @@ ----------------------------------- -- Blade: Jin +-- Family: Humanoid Katana Weaponskill +-- Description: Delivers a 3 hit attack. ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - -- mob:messageBasic(xi.msg.basic.READIES_WS, 0, 41) + mob:messageBasic(xi.msg.basic.READIES_WS, 0, 134) + return 0 end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ACC_VARIES, 1, 2, 3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 + -- params.canCrit = true -- TODO: Capture if mobskill crits or not. + -- params.criticalChance = { 1.0, 1.0, 1.0 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/blade_ku.lua b/scripts/actions/mobskills/blade_ku.lua index d0c4d4b5f0d..b95b820401b 100644 --- a/scripts/actions/mobskills/blade_ku.lua +++ b/scripts/actions/mobskills/blade_ku.lua @@ -1,23 +1,34 @@ ----------------------------------- -- Blade: Ku +-- Family: Humanoid Katana Weaponskill +-- Description: Delivers a 5 hit attack. ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - -- mob:messageBasic(xi.msg.basic.READIES_WS, 0, 41) + mob:messageBasic(xi.msg.basic.READIES_WS, 0, 136) + return 0 end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ACC_VARIES, 1, 2, 3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 5 + params.fTP = { 1.0, 1.0, 1.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_5 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/blade_metsu.lua b/scripts/actions/mobskills/blade_metsu.lua index e4cf010b91a..488fb1ab1a5 100644 --- a/scripts/actions/mobskills/blade_metsu.lua +++ b/scripts/actions/mobskills/blade_metsu.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Blade Metsu --- --- Description: Additional effect: Paralysis Kikoku/Yoshimitsu: Temporarily enhances Subtle Blow xi.effect. --- Type: Physical --- Range: Melee +-- Blade Metsu +-- Family: Humanoid Katana Weaponskill +-- Description: Additional effect: Paralysis ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,17 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.5 -- fTP and fTP scaling unknown. TODO: capture ftp + local params = {} - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.5, 2.5, 2.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.PARALYSIS, 10, 0, 60) -- Is this real...? + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PARALYSIS, 10, 0, 60) -- TODO: Capture effect + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/blade_to.lua b/scripts/actions/mobskills/blade_to.lua index fd8e46499c1..628e71581fb 100644 --- a/scripts/actions/mobskills/blade_to.lua +++ b/scripts/actions/mobskills/blade_to.lua @@ -1,23 +1,34 @@ ----------------------------------- -- Blade: To +-- Family: Humanoid Katana Weaponskill +-- Description: ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - -- mob:messageBasic(xi.msg.basic.READIES_WS, 0, 41) + mob:messageBasic(xi.msg.basic.READIES_WS, 0, 131) + return 0 end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ACC_VARIES, 1, 2, 3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/blind_side_barrage.lua b/scripts/actions/mobskills/blind_side_barrage.lua index 360d967c021..30ec4bed90e 100644 --- a/scripts/actions/mobskills/blind_side_barrage.lua +++ b/scripts/actions/mobskills/blind_side_barrage.lua @@ -1,10 +1,8 @@ ----------------------------------- -- Blindside Barrage --- Description: Deals physical damage to a single target. Additional Effect: MND,INT Down - Can critically strike. --- Notorious Monster/Nightmare version deals damage in a 10 yalm area of effect around target. --- Type: Physical (Blunt) --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Family: Lesser Bird +-- Description: Deals physical damage to a single target. Additional Effect: INT Down, MND Down +-- Notes: Notorious Monster/Nightmare version deals damage in a 10 yalm area of effect around target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,19 +12,32 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.0 - local power = 3 + math.floor(mob:getMainLvl() / 5) - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.MND_DOWN, power, 0, 120) -- Does not decay - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.INT_DOWN, power, 0, 120) - - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + -- TODO: AOE Version may take more shadows since it is AoE + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + local power = 3 + math.floor(mob:getMainLvl() / 5) + + -- Note: Status effects do not decay. + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.MND_DOWN, power, 0, 120) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.INT_DOWN, power, 0, 120) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/blind_vortex.lua b/scripts/actions/mobskills/blind_vortex.lua index 7752527da1e..3ab74b048c3 100644 --- a/scripts/actions/mobskills/blind_vortex.lua +++ b/scripts/actions/mobskills/blind_vortex.lua @@ -1,10 +1,7 @@ ----------------------------------- -- Blind Vortex --- --- Description: Strikes a single target in the face. Additional effect: Blind --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Family: Greater Bird +-- Description: Strikes a single target in the face. Additional Effect: Blind ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,17 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1.5 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 -- TODO: Capture shadowBehavior - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BLINDNESS, 18, 0, 120) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BLINDNESS, 18, 0, 120) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/blindeye.lua b/scripts/actions/mobskills/blindeye.lua index aec8db4e795..66b89f767f9 100644 --- a/scripts/actions/mobskills/blindeye.lua +++ b/scripts/actions/mobskills/blindeye.lua @@ -1,11 +1,7 @@ ----------------------------------- --- Blindeye --- --- Description: Inflicts damage on a single target. Additional effect: Blind --- Type: Physical --- Utsusemi/Blink absorb: Yes --- Range: Single target --- Notes: +-- Blindeye +-- Family: Ahriman +-- Description: Inflicts damage on a single target. Additional Effect: Blind ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,16 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BLINDNESS, 30, 0, 30) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BLINDNESS, 30, 0, 30) + -- TODO: Jimmayus spreadsheet says this lowers MACC as well. Need to confirm + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/blockhead.lua b/scripts/actions/mobskills/blockhead.lua index a9666ba2376..018f2ef4cf0 100644 --- a/scripts/actions/mobskills/blockhead.lua +++ b/scripts/actions/mobskills/blockhead.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Blockhead --- Deals damage to a single target. Additional effect: Knockback +-- Family: Lizard +-- Description: Deals damage to a single target. Additional Effect: Knockback ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/bloodrake.lua b/scripts/actions/mobskills/bloodrake.lua index 70ed220c897..70a465853d9 100644 --- a/scripts/actions/mobskills/bloodrake.lua +++ b/scripts/actions/mobskills/bloodrake.lua @@ -1,11 +1,7 @@ ----------------------------------- -- Bloodrake --- --- Description: Slashes up a single target. Additional effect: Drain --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow? --- Range: Melee --- Notes: A spell equivalent to Sanguine Blade in terms of functionality where damage dealt is absorbed as health recovered. +-- Family: Vampyr +-- Description: Delivers a three hit attack. Additional Effect: Drain ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,15 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3.0 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - skill:setMsg(xi.mobskills.mobPhysicalDrainMove(mob, target, skill, xi.mobskills.drainType.HP, dmg)) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + skill:setMsg(xi.mobskills.mobDrainMove(mob, target, xi.mobskills.drainType.HP, info.damage)) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/bloody_beak.lua b/scripts/actions/mobskills/bloody_beak.lua index fd015a49e77..cb9d779ca4d 100644 --- a/scripts/actions/mobskills/bloody_beak.lua +++ b/scripts/actions/mobskills/bloody_beak.lua @@ -1,9 +1,7 @@ ----------------------------------- -- Bloody Beak --- Family: Amphipteres +-- Family: Amphiptere -- Description: 3 fold physical attack to targets in front of mob. Additional Effect: HP Drain --- Range: 5' --- TODO: Umeboshi: "This seems to be a physical skill, will fix it in the pass on mobPhysicalMove()" ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,15 +13,14 @@ end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) local params = {} - params.baseDamage = mob:getMainLvl() + 2 - params.fTP = { 3, 3, 3 } - params.element = xi.element.WIND - params.attackType = xi.attackType.MAGICAL - params.damageType = xi.damageType.WIND - params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS - params.dStatMultiplier = 1 + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS -- TODO: Capture shadowBehavior - local info = xi.mobskills.mobMagicalMove(mob, target, skill, action, params) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) if xi.mobskills.processDamage(mob, target, skill, action, info) then skill:setMsg(xi.mobskills.mobDrainMove(mob, target, xi.mobskills.drainType.HP, info.damage, info.attackType, info.damageType)) diff --git a/scripts/actions/mobskills/bloody_caress.lua b/scripts/actions/mobskills/bloody_caress.lua index 9dd746406e1..6370dff84a4 100644 --- a/scripts/actions/mobskills/bloody_caress.lua +++ b/scripts/actions/mobskills/bloody_caress.lua @@ -1,12 +1,7 @@ ----------------------------------- --- Bloody Caress --- --- Delivers a threefold attack. Additional effect: Drain --- Type: Physical --- 100% TP: ??? / 250% TP: ??? / 300% TP: ??? --- Note: There is not a whole lot of info about this spell available online, --- so the initial implemention is just a basic version similar to --- Goblin Rush, which is also a physical 3-hit spell. +-- Bloody Caress +-- Family: Rafflesia +-- Description: Delivers a threefold attack. Additional Effect: Drain ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -16,18 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 1 + local params = {} - -- TODO: Once `Floral Bouquet` TP move is implemented, this skill is eligible to target - -- the charmed monsters. + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ACC_VARIES, 1, 2, 3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - skill:setMsg(xi.mobskills.mobPhysicalDrainMove(mob, target, skill, xi.mobskills.drainType.HP, dmg)) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + skill:setMsg(xi.mobskills.mobDrainMove(mob, target, xi.mobskills.drainType.HP, info.damage)) + end + + -- TODO: The Rafflesia should be able to target charmed vermin with this skill. Might be best handled in a mixin or mob script. + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/bloody_claw.lua b/scripts/actions/mobskills/bloody_claw.lua index a740e347ed9..914167fe9e1 100644 --- a/scripts/actions/mobskills/bloody_claw.lua +++ b/scripts/actions/mobskills/bloody_claw.lua @@ -1,17 +1,13 @@ ----------------------------------- -- Bloody Claw -- Family: Gargouille --- Description: Steals an enemy's HP. Additional effect: Reduces a random stat. --- Type: Physical --- Utsusemi/Blink absorb: Ignores shadows --- Range: Melee --- Notes: Despite the attack ignoring Utsusemi, it is physical, and therefore capable of missing entirely. +-- Description: Steals an enemy's HP. Additional Effect: Reduces a random stat. ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - if mob:getAnimationSub() ~= 4 then + if mob:getAnimationSub() ~= 4 then -- TODO: Standardize mob spawn anim sub return 1 else return 0 @@ -19,19 +15,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 0.9 - local typeEffect = 136 + math.random(0, 6) -- 136 is xi.effect.STR_DOWN add 0 to 6 for all 7 of the possible attribute reductions + local params = {} - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.IGNORE_SHADOWS) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 0.9, 0.9, 0.9 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS - skill:setMsg(xi.mobskills.mobPhysicalDrainMove(mob, target, skill, xi.mobskills.drainType.HP, dmg)) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, typeEffect, 20, 3, 120) + if xi.mobskills.processDamage(mob, target, skill, action, info) then + skill:setMsg(xi.mobskills.mobDrainMove(mob, target, xi.mobskills.drainType.HP, info.damage)) - return dmg + -- Add 0 to 6 for all 7 of the possible attribute reductions + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STR_DOWN + math.random(0, 6), 20, 9, 120) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/blow.lua b/scripts/actions/mobskills/blow.lua index c7f8cfafa54..ce06e48d9ee 100644 --- a/scripts/actions/mobskills/blow.lua +++ b/scripts/actions/mobskills/blow.lua @@ -1,8 +1,7 @@ ----------------------------------- --- Blow --- --- Description: Damage varies with TP. Additional effect: "Stun." --- Type: Physical (Blunt) +-- Blow +-- Family: Goobbue +-- Description: Deals damage to a single target. Additional Effect: Stun ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,16 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ATK_VARIES, 1.5, 1.5, 1.5) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 4) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.attackMultiplier = { 1.5, 1.5, 1.5 } - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) -- TODO: Capture Stun duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/bludgeon.lua b/scripts/actions/mobskills/bludgeon.lua index 09f878a09a0..1ad03efb510 100644 --- a/scripts/actions/mobskills/bludgeon.lua +++ b/scripts/actions/mobskills/bludgeon.lua @@ -1,8 +1,7 @@ ----------------------------------- --- Bludgeon --- --- Description: Delivers a threefold attack. Accuracy varies with TP. --- Type: Physical (Blunt) +-- Bludgeon +-- Family: Cardian +-- Description: Delivers a threefold attack. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,13 +11,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ACC_VARIES, 1, 2, 3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 + -- TODO: Might have an accuracy modifier? + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/body_slam.lua b/scripts/actions/mobskills/body_slam.lua index 84e0ad9e9d4..32bdac03c1e 100644 --- a/scripts/actions/mobskills/body_slam.lua +++ b/scripts/actions/mobskills/body_slam.lua @@ -1,8 +1,7 @@ ----------------------------------- --- Body Slam --- --- Description: Delivers an area attack. Damage varies with TP. --- Type: Physical (Blunt) +-- Body Slam +-- Family: Dragon +-- Description: Delivers a physical damage to targets around mob. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,16 +10,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) return 0 end --- TODO: can crit mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/bomb_toss.lua b/scripts/actions/mobskills/bomb_toss.lua index c33fd3dd7c8..edfab3968f1 100644 --- a/scripts/actions/mobskills/bomb_toss.lua +++ b/scripts/actions/mobskills/bomb_toss.lua @@ -19,7 +19,7 @@ mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) params.element = xi.element.FIRE params.attackType = xi.attackType.MAGICAL params.damageType = xi.damageType.FIRE - params.shadowBehavior = xi.mobskills.shadowBehavior.WIPE_SHADOWS + params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS local info = xi.mobskills.mobMagicalMove(mob, target, skill, action, params) diff --git a/scripts/actions/mobskills/bone_crunch.lua b/scripts/actions/mobskills/bone_crunch.lua index 16c6dff23e8..745eba34073 100644 --- a/scripts/actions/mobskills/bone_crunch.lua +++ b/scripts/actions/mobskills/bone_crunch.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Bone Crunch --- Deals damage to a single target. Additional effect: Plague +-- Family: Bugard +-- Description: Deals damage to a single target. Additional Effect: Plague ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,18 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - - if dmg > 0 then - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.PLAGUE, 5, 0, 60) + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PLAGUE, 5, 0, 60) end - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/bonebreaking_barrage.lua b/scripts/actions/mobskills/bonebreaking_barrage.lua index d7082ff336e..24eb4f6c010 100644 --- a/scripts/actions/mobskills/bonebreaking_barrage.lua +++ b/scripts/actions/mobskills/bonebreaking_barrage.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Bonebreaking Barrage --- Deals damage to a single target. Additional effect: Gravity, Max HP Down (-50%) +-- Family: Yztargs +-- Description: Deals damage to a single target. Additional Effect: Gravity, Max HP Down (-50%) ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,18 +11,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.0 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.MAX_HP_DOWN, 0, 0, 60) - xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.WEIGHT, 50, 0, 30) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 -- TODO: Capture numHits + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 -- TODO: Capture shadowBehavior (Likely matches numHits) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + -- TODO: Capture status effect power/duration. + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.MAX_HP_DOWN, 50, 0, 60) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.WEIGHT, 50, 0, 30) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/brain_crush.lua b/scripts/actions/mobskills/brain_crush.lua index 9f878d49178..9ddcf68238c 100644 --- a/scripts/actions/mobskills/brain_crush.lua +++ b/scripts/actions/mobskills/brain_crush.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Brain Crush --- Deals damage to single target. Additional effect: Silence +-- Family: Lizard +-- Description: Deals damage to single target. Additional Effect: Silence ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,18 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - - if dmg > 0 then - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.SILENCE, 1, 0, 30) + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.SILENCE, 1, 0, 30) end - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/brain_drain.lua b/scripts/actions/mobskills/brain_drain.lua index 758e1e2b65c..e28a3681d07 100644 --- a/scripts/actions/mobskills/brain_drain.lua +++ b/scripts/actions/mobskills/brain_drain.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Brain Drain --- Deals damage to a single target. Additional effect: INT Down +-- Family Leech +-- Description: Deals Dark damage to a single target. Additional Effect: INT Down ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,17 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.MAGICAL, xi.damageType.DARK, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.INT_DOWN, 10, 3, 120) + params.baseDamage = mob:getMainLvl() + 2 + params.fTP = { 3.0, 3.0, 3.0 } + params.element = xi.element.DARK + params.attackType = xi.attackType.MAGICAL + params.damageType = xi.damageType.DARK + params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS - target:takeDamage(dmg, mob, xi.attackType.MAGICAL, xi.damageType.DARK) + local info = xi.mobskills.mobMagicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + -- TODO: Capture effect power/duration + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.INT_DOWN, 10, 9, 120) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/brain_spike.lua b/scripts/actions/mobskills/brain_spike.lua index 02a655593d6..b8a783a3c3c 100644 --- a/scripts/actions/mobskills/brain_spike.lua +++ b/scripts/actions/mobskills/brain_spike.lua @@ -1,12 +1,13 @@ ----------------------------------- -- Brain Spike --- Deals damage to single target. Additional effect: Paralyze +-- Family: Craver +-- Description: Deals damage to single target. Additional Effect: Paralysis ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - if mob:isMobType(xi.mobType.NOTORIOUS) then + if mob:isMobType(xi.mobType.NOTORIOUS) then -- TODO: Set proper skill lists return 1 end @@ -14,18 +15,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.PARALYSIS, 15, 0, 90) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PARALYSIS, 15, 0, 90) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/broadside_barrage.lua b/scripts/actions/mobskills/broadside_barrage.lua index 937a30475d2..6f54165383d 100644 --- a/scripts/actions/mobskills/broadside_barrage.lua +++ b/scripts/actions/mobskills/broadside_barrage.lua @@ -1,10 +1,8 @@ ----------------------------------- -- Broadside Barrage --- Description: Deals physical damage to a single target. Additional Effect: STR,VIT Down - Can critically strike. --- Notorious Monster/Nightmare version deals damage in a 10 yalm area of effect around target. --- Type: Physical (Blunt) --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Family: Lesser Bird +-- Description: Deals physical damage to a single target. Additional Effect: INT Down, MND Down +-- Notes: Notorious Monster/Nightmare version deals damage in a 10 yalm area of effect around target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,19 +12,32 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.0 - local power = 3 + math.floor(mob:getMainLvl() / 5) - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STR_DOWN, power, 0, 120) -- Does not decay - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.VIT_DOWN, power, 0, 120) - - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + -- TODO: AOE Version may take more shadows since it is AoE + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + local power = 3 + math.floor(mob:getMainLvl() / 5) + + -- Note: Status effects do not decay. + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STR_DOWN, power, 0, 120) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.VIT_DOWN, power, 0, 120) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/burst.lua b/scripts/actions/mobskills/burst.lua index ac8316e33a2..329c74a3df7 100644 --- a/scripts/actions/mobskills/burst.lua +++ b/scripts/actions/mobskills/burst.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Burst --- Fires several arrows at a single target. +-- Family: Orc Warmachine +-- Description: Fires several arrows at a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,13 +11,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + -- TODO: Is this Physical or Ranged? + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING -- TODO: Capture damageType + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/calamity.lua b/scripts/actions/mobskills/calamity.lua index 8eff85faf82..265222d181e 100644 --- a/scripts/actions/mobskills/calamity.lua +++ b/scripts/actions/mobskills/calamity.lua @@ -1,29 +1,34 @@ ----------------------------------- --- Calamity --- --- Description: Delivers a single-hit attack. Damage varies with TP. --- Type: Physical --- Number of hits --- Range: Melee +-- Calamity +-- Family: Humanoird Axe Weaponskill +-- Description: Delivers a single-hit attack. ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) mob:messageBasic(xi.msg.basic.READIES_WS, 0, 685 + 256) + return 0 end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - - -- Didn't see any numbers, so just giving it something on par with other AAs. - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/calcifying_claw.lua b/scripts/actions/mobskills/calcifying_claw.lua index f96231723f3..f90ab487180 100644 --- a/scripts/actions/mobskills/calcifying_claw.lua +++ b/scripts/actions/mobskills/calcifying_claw.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Calcifying Claw --- Deals damage to a single target. Additional effect: Petrification, Knockback +-- Family: Yztarg +-- Description: Deals damage to a single target. Additional Effect: Knockback, Petrification ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,17 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.0 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PETRIFICATION, 50, 0, 30) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 -- TODO: Capture shadowBehavior - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PETRIFICATION, 50, 0, 30) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/calcifying_deluge.lua b/scripts/actions/mobskills/calcifying_deluge.lua index 3e61ff8e4ec..eb9eb12c8c8 100644 --- a/scripts/actions/mobskills/calcifying_deluge.lua +++ b/scripts/actions/mobskills/calcifying_deluge.lua @@ -1,11 +1,8 @@ ----------------------------------- -- Calcifying Deluge --- --- Description: Delivers a threefold ranged attack to targets in an area of effect. Additional effect: Petrification --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows --- Range: Unknown --- Notes: Used only by Medusa. +-- Lamia (Medusa) +-- Description: Deals physical damage to targets in range. Additional Effect: Petrification +-- Notes: Used by Medusa. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,16 +12,27 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, xi.mobskills.shadowBehavior.NUMSHADOWS_3) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.PETRIFICATION, 1, 0, 120) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 6.0, 6.0, 6.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + params.skipParry = true + params.skipGuard = true + params.skipBlock = true - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - return dmg + local info = xi.mobskills.mobRangedMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PETRIFICATION, 1, 0, 120) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/camisado.lua b/scripts/actions/mobskills/camisado.lua index a8240755cf4..571f9eabe12 100644 --- a/scripts/actions/mobskills/camisado.lua +++ b/scripts/actions/mobskills/camisado.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Camisado --- Single-target physical damage and knockback. +-- Family: Avatar (Diabolos) +-- Description: Single-target physical damage. Additional Effect: Knockback ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,14 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.75 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) + local params = {} - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.75, 2.75, 2.75 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/cannonball.lua b/scripts/actions/mobskills/cannonball.lua index eda573d869d..570c4d6ead8 100644 --- a/scripts/actions/mobskills/cannonball.lua +++ b/scripts/actions/mobskills/cannonball.lua @@ -2,16 +2,13 @@ -- Cannonball -- Family: Wamouracampa -- Description: Damage varies with TP. --- Type: Physical --- Utsusemi/Blink absorb: One shadow --- Range: 20 -- Notes: Uses defense instead of attack. Curled form only. ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - if mob:getAnimationSub() == 5 then + if mob:getAnimationSub() == 5 then -- TODO: Standardize mob spawn animSub return 0 else return 1 @@ -19,16 +16,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 - local params = { isCannonball = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.isCannonball = true - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/carousel.lua b/scripts/actions/mobskills/carousel.lua index f3f3ed97d92..2d4117bc68f 100644 --- a/scripts/actions/mobskills/carousel.lua +++ b/scripts/actions/mobskills/carousel.lua @@ -1,12 +1,13 @@ ----------------------------------- -- Carousel --- Becomes a merry-go-round of pain that damages players in range. +-- Family: Cravers +-- Description: Deals physical damage to targets in range. ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - if mob:isMobType(xi.mobType.NOTORIOUS) then + if mob:isMobType(xi.mobType.NOTORIOUS) then -- TODO: Set proper skill lists return 0 end @@ -14,13 +15,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 0.8 - local ftp = 1.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 -- TODO: Capture/confirm if multi hit skill + params.fTP = { 1.5, 1.5, 1.5 } -- TODO: Capture fTPs if not a multi hit. + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/catapult.lua b/scripts/actions/mobskills/catapult.lua index fe892dd7330..ef449307488 100644 --- a/scripts/actions/mobskills/catapult.lua +++ b/scripts/actions/mobskills/catapult.lua @@ -1,6 +1,8 @@ ----------------------------------- --- Ranged Attack --- Deals a ranged attack to a single target. +-- Catapult +-- Family: Gigas +-- Description: Deals a ranged attack to a single target. +-- Notes: Used as the standard ranged attack for Gigas RNGs. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,21 +17,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local dmgmod = 3 + local params = {} - local info = xi.mobskills.mobRangedMove(mob, target, skill, numhits, accmod, dmgmod, xi.mobskills.magicalTpBonus.NO_EFFECT) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } + params.attackType = xi.attackType.RANGED + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.skipParry = true + params.skipGuard = true + params.skipBlock = true - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.RANGED, xi.damageType.PIERCING, info.hitslanded) + local info = xi.mobskills.mobRangedMove(mob, target, skill, action, params) - if dmg > 0 then - target:addTP(20) - mob:addTP(80) + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) end - target:takeDamage(dmg, mob, xi.attackType.RANGED, xi.damageType.PIERCING) - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/catastrophe.lua b/scripts/actions/mobskills/catastrophe.lua index ba03264d762..0261ebb0510 100644 --- a/scripts/actions/mobskills/catastrophe.lua +++ b/scripts/actions/mobskills/catastrophe.lua @@ -1,9 +1,7 @@ ----------------------------------- -- Catastrophe --- --- Description: Drain target's HP. Bec de Faucon/Apocalypse: Additional effect: Haste --- Type: Physical --- Range: Melee +-- Family: Humanoid Scythe Weaponskill +-- Description: Deals damage to a target. Additional Effect: HP Drain ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,15 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.5 -- fTP and fTP scaling unknown. TODO: capture ftp + local params = {} - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.5, 2.5, 2.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - skill:setMsg(xi.mobskills.mobPhysicalDrainMove(mob, target, skill, xi.mobskills.drainType.HP, dmg)) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + skill:setMsg(xi.mobskills.mobDrainMove(mob, target, xi.mobskills.drainType.HP, info.damage)) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/chant_du_cygne.lua b/scripts/actions/mobskills/chant_du_cygne.lua index bcf64d577c1..b4c520355e2 100644 --- a/scripts/actions/mobskills/chant_du_cygne.lua +++ b/scripts/actions/mobskills/chant_du_cygne.lua @@ -1,8 +1,7 @@ ----------------------------------- -- Chant du Cygne +-- Family: Humanoid Sword Weaponskill -- Description: Delivers a threefold attack. Chance of critical hit varies with TP. --- Type: Physical --- Element: None -- Stat Modifier: 80% DEX ----------------------------------- ---@type TMobSkill @@ -13,15 +12,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 1.6328125 + local params = {} - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.CRIT_VARIES, 0.15, 0.25, 0.40) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 1.6328125, 1.6328125, 1.6328125 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 + params.canCrit = true + params.criticalChance = { 0.15, 0.25, 0.40 } - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/chaotic_strike.lua b/scripts/actions/mobskills/chaotic_strike.lua index 31ba69aeeb6..838a3a174a0 100644 --- a/scripts/actions/mobskills/chaotic_strike.lua +++ b/scripts/actions/mobskills/chaotic_strike.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Chaotic Strike --- Ramuh delivers a three-hit attack that also stuns target. +-- Family: Avatar (Ramuh) +-- Description: Ramuh delivers a three-hit attack. Additional Effect: Stun ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 1.1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 1, 2, 3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 10) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 1.1, 1.1, 1.1 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 10) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/choke_breath.lua b/scripts/actions/mobskills/choke_breath.lua index d9ad5f33e52..bb24ea6ae90 100644 --- a/scripts/actions/mobskills/choke_breath.lua +++ b/scripts/actions/mobskills/choke_breath.lua @@ -1,8 +1,7 @@ ----------------------------------- -- Choke Breath -- Family: Hippogryph --- Description : Deals sonic damage to enemies within a fan-shaped area originating from caster. Additional effects: Paralysis, Silence. --- Type: Physical +-- Description : Deals sonic damage to enemies within a fan-shaped area originating from caster. Additional Effects: Paralysis, Silence. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,20 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local chokeBreath = 100 - local info = - { - damage = chokeBreath - } + local params = {} - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_1) + params.baseDamage = 100 + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.PARALYSIS, 25, 0, 30) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.SILENCE, 1, 0, 30) + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) - return dmg + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PARALYSIS, 25, 0, 30) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.SILENCE, 1, 0, 30) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/chomp_rush.lua b/scripts/actions/mobskills/chomp_rush.lua index b2b7b374055..536be7e320d 100644 --- a/scripts/actions/mobskills/chomp_rush.lua +++ b/scripts/actions/mobskills/chomp_rush.lua @@ -1,10 +1,7 @@ ----------------------------------- --- Chomp Rush --- --- Description: Deals damage in a threefold attack to a single target. Additional effect: slow (25%) --- Type: Physical --- Utsusemi/Blink absorb: 3 shadows --- Range: Melee +-- Chomp Rush +-- Family: Raptor +-- Description: Deals damage in a threefold attack to a single target. Additional Effect: Slow ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 1.1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.SLOW, 1250, 0, 60) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.SLOW, 2500, 0, 180) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/circle_blade.lua b/scripts/actions/mobskills/circle_blade.lua index 6db0cc88a10..ba6cd29dcec 100644 --- a/scripts/actions/mobskills/circle_blade.lua +++ b/scripts/actions/mobskills/circle_blade.lua @@ -1,10 +1,7 @@ ----------------------------------- -- Circle Blade --- +-- Family: Humanoid Sword Weaponskill -- Description: Delivers an area of effect attack. Attack radius varies with TP. --- Type: Physical --- Utsusemi/Blink absorb: ??? --- Range: Melee range radial ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,15 +12,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_1) + local params = {} - -- About 200-300 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.5, 2.5, 2.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/circle_of_flames.lua b/scripts/actions/mobskills/circle_of_flames.lua index c7864837f08..dc2802809d9 100644 --- a/scripts/actions/mobskills/circle_of_flames.lua +++ b/scripts/actions/mobskills/circle_of_flames.lua @@ -46,7 +46,7 @@ mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) if xi.mobskills.processDamage(mob, target, skill, action, info) then target:takeDamage(info.damage, mob, info.attackType, info.damageType) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.WEIGHT, 20, 0, 120) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.WEIGHT, 20, 0, 120) end return info.damage diff --git a/scripts/actions/mobskills/claw.lua b/scripts/actions/mobskills/claw.lua index 76d17947e49..f58090403a5 100644 --- a/scripts/actions/mobskills/claw.lua +++ b/scripts/actions/mobskills/claw.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Claw --- Garuda delivers a single-hit piercing attack on target +-- Family: Avatar (Garuda) +-- Description: Garuda delivers a single-hit piercing attack on target ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 1, 2, 3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.5, 3.5, 3.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/claw_cyclone.lua b/scripts/actions/mobskills/claw_cyclone.lua index 3f2879129f7..b6020c0dae6 100644 --- a/scripts/actions/mobskills/claw_cyclone.lua +++ b/scripts/actions/mobskills/claw_cyclone.lua @@ -1,8 +1,7 @@ ----------------------------------- --- Claw Cyclone --- Description: Deals 200% base damage to enemies in a fan shaped area. --- Type: Physical --- Range : 15' +-- Claw Cyclone +-- Family: Tiger +-- Description: Deals 200% base damage to enemies in a fan shaped area. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/claw_storm.lua b/scripts/actions/mobskills/claw_storm.lua index 278f925d91e..57c154fbd3a 100644 --- a/scripts/actions/mobskills/claw_storm.lua +++ b/scripts/actions/mobskills/claw_storm.lua @@ -1,10 +1,7 @@ ----------------------------------- --- Claw Storm --- --- Description: Slashes a single target in a threefold attack. Additional effect: Poison --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Claw Storm +-- Family: Opo-Opo +-- Description: Slashes a single target in a threefold attack. Additional Effect: Poison ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.POISON, 7, 3, 60) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.POISON, 7, 3, 60) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/clobber.lua b/scripts/actions/mobskills/clobber.lua index f7dad45d0d1..e2d857574ba 100644 --- a/scripts/actions/mobskills/clobber.lua +++ b/scripts/actions/mobskills/clobber.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Clobber --- Description: Only used when targets behind it gets hate. --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows --- Range: Melee +-- Clobber +-- Family: Wivre +-- Description: Only used when targets behind it gets hate. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -17,13 +15,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = .8 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING -- TODO: Capture damageType + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/colossal_blow.lua b/scripts/actions/mobskills/colossal_blow.lua index 2cccc24796e..03f9fc7476a 100644 --- a/scripts/actions/mobskills/colossal_blow.lua +++ b/scripts/actions/mobskills/colossal_blow.lua @@ -1,6 +1,7 @@ ----------------------------------- --- Colossal_Blow --- Deals damage to a single target. +-- Colossal Blow +-- Family: Omega +-- Description: Deals near lethal damage to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,24 +11,31 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local currentHP = target:getHP() - local damage = currentHP + local params = {} - -- if we have more than 30% hp, reduce to 5% - if target:getHPP() > 30 then - damage = currentHP * .95 - end + params.baseDamage = target:getHP() + params.numHits = 1 + params.fTP = { 0.95, 0.95, 0.95 } -- TODO: Capture % of current HP this does. + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS + params.skipFSTR = true + params.skipPDIF = true + params.skipParry = true -- TODO: Confirm this can't be parried, guarded or blocked. + params.skipGuard = true + params.skipBlock = true + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - local info = - { - damage - } + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, xi.mobskills.shadowBehavior.IGNORE_SHADOWS) + -- TODO: Capture hate reset type (Enmity wipe vs enmity turned off) + -- See Antica skill "Sand Trap" for reference + mob:resetEnmity(target) + end - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - mob:resetEnmity(target) - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/colossal_slam.lua b/scripts/actions/mobskills/colossal_slam.lua index 1fd98c518c2..2e997f5cbec 100644 --- a/scripts/actions/mobskills/colossal_slam.lua +++ b/scripts/actions/mobskills/colossal_slam.lua @@ -1,7 +1,7 @@ ----------------------------------- -- Colossal Slam --- Deals damage based off TP. --- 100% TP: ??? / 250% TP: ??? / 300% TP: ??? +-- Family: Gigas +-- Description: Deals AoE physical damage to targets in range. Additional Effect: Curse II ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,17 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3.0 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, xi.mobskills.shadowBehavior.NUMSHADOWS_3) + local params = {} - -- TODO: The duration needs verification from retail - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.CURSE_II, 0, 0, 30) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + -- TODO: The duration needs verification from retail + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.CURSE_II, 0, 0, 30) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/combo.lua b/scripts/actions/mobskills/combo.lua index e0c45adf8d3..b2934ba675b 100644 --- a/scripts/actions/mobskills/combo.lua +++ b/scripts/actions/mobskills/combo.lua @@ -1,7 +1,7 @@ ----------------------------------- -- Combo --- Description: Damage varies with TP. --- Type: Physical +-- Family: Humanoid Hand to Hand Weaponskill +-- Description: Delivers a 3 hit attack ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,14 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 1 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.HTH, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.HTH) - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.HTH + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/concussive_oscillation.lua b/scripts/actions/mobskills/concussive_oscillation.lua index 9c049b2dcac..88dd4b43ade 100644 --- a/scripts/actions/mobskills/concussive_oscillation.lua +++ b/scripts/actions/mobskills/concussive_oscillation.lua @@ -1,7 +1,7 @@ ----------------------------------- -- Concussive Oscillation --- Smacks around all nearby targets. Additional effect: Knockback + Weight --- Utsusemi/Blink absorb: 2-3 shadows +-- Family: Yovra +-- Description: Deals AoE physical damage to targets in range. Additional effect: Knockback + Weight ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,16 +12,24 @@ end -- TODO: allegedly damage varies with tp mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, xi.mobskills.shadowBehavior.NUMSHADOWS_3) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.WEIGHT, 75, 0, 120) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.WEIGHT, 75, 0, 120) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/condemnation.lua b/scripts/actions/mobskills/condemnation.lua index 8c981f611e7..68f3b9b49f8 100644 --- a/scripts/actions/mobskills/condemnation.lua +++ b/scripts/actions/mobskills/condemnation.lua @@ -1,13 +1,19 @@ ----------------------------------- -- Condemnation --- Deals damage in a threefold attack to enemies within a fan-shaped area of effect. +-- Family: Demon (Kindred) +-- Description: Deals conal physical damage to targets in front of mob. Additional Effect: Stun ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) + -- TODO: Set proper skill lists local zone = mob:getZoneID() - if mob:isInDynamis() or zone == 5 then + + if + mob:isInDynamis() or + zone == xi.zone.ULEGUERAND_RANGE + then return 0 end @@ -15,16 +21,27 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 3, 3, 3 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 + -- TODO: Seemed to be rather inaccurate during captures as a Lv 75 WHM vs Lv 82 Demon. + -- params.accuracyModifier = { -xx, -xx, -xx } + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 6) + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + -- TODO: Capture stun duration + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 12) + end - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/coronach.lua b/scripts/actions/mobskills/coronach.lua index 3b4178a5be6..4f1fd178322 100644 --- a/scripts/actions/mobskills/coronach.lua +++ b/scripts/actions/mobskills/coronach.lua @@ -1,10 +1,7 @@ ----------------------------------- --- Coronach --- --- Description: Annihilator/Ferninand: Temporarily lowers enmity. --- Type: Physical --- Shadow per hit --- Range: Melee +-- Coronach +-- Family: Humanoid Marksmanship Weaponskill +-- Description: Annihilator/Ferninand: Temporarily lowers enmity. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,15 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.5 -- fTP and fTP scaling unknown. TODO: capture ftp + local params = {} - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.RANGED, xi.damageType.PIERCING, info.hitslanded) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.5, 2.5, 2.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.skipParry = true + params.skipGuard = true + params.skipBlock = true - target:takeDamage(dmg, mob, xi.attackType.RANGED, xi.damageType.PIERCING) - return dmg + local info = xi.mobskills.mobRangedMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/crescent_fang.lua b/scripts/actions/mobskills/crescent_fang.lua index d6e3e4f7ff4..8bd4d1539dc 100644 --- a/scripts/actions/mobskills/crescent_fang.lua +++ b/scripts/actions/mobskills/crescent_fang.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Crescent Fang --- Fenrir inflicts Paralysis along with a single attack to target. +-- Family: Avatar (Fenrir) +-- Description: Fenrir inflicts Paralysis along with a single attack to target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,17 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 2 - local ftp = 2.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 2 + params.fTP = { 2.5, 2.5, 2.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.PARALYSIS, 50, 0, 90) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PARALYSIS, 50, 0, 90) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/crescent_moon.lua b/scripts/actions/mobskills/crescent_moon.lua index 4b6c0f24ef1..67aa04cfed6 100644 --- a/scripts/actions/mobskills/crescent_moon.lua +++ b/scripts/actions/mobskills/crescent_moon.lua @@ -1,10 +1,7 @@ ----------------------------------- --- Crescent Moon --- --- Description: Delivers a powerful strike to a single target. --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Crescent Moon +-- Family: Avatar (Fenrir) +-- Description: Delivers a powerful strike to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/crippling_slam.lua b/scripts/actions/mobskills/crippling_slam.lua index 79a81a345c9..2457d45ce97 100644 --- a/scripts/actions/mobskills/crippling_slam.lua +++ b/scripts/actions/mobskills/crippling_slam.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Crippling Slam --- Description: Deals severe damage to targets in front of it by slamming into them. Additional effect: Paralysis. --- Type: Physical --- Utsusemi/Blink absorb: Wipes Shadows --- Range: Melee +-- Crippling Slam +-- Family: Wivre +-- Description: Deals severe damage to targets in front of it by slamming into them. Additional effect: Paralysis. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -17,17 +15,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 4 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.WIPE_SHADOWS) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + local params = {} - local duration = xi.mobskills.calculateDuration(skill:getTP(), 30, 60) - xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PARALYSIS, 50, 0, duration) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 4.0, 4.0, 4.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING -- TODO: Capture damageType + params.shadowBehavior = xi.mobskills.shadowBehavior.WIPE_SHADOWS -- TODO: Capture shadowBehavior - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + local duration = xi.mobskills.calculateDuration(skill:getTP(), 30, 60) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PARALYSIS, 50, 0, duration) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/critical_bite.lua b/scripts/actions/mobskills/critical_bite.lua index ff7124fb7bb..e0bad539761 100644 --- a/scripts/actions/mobskills/critical_bite.lua +++ b/scripts/actions/mobskills/critical_bite.lua @@ -1,10 +1,8 @@ ----------------------------------- -- Critical Bite --- +-- Family: Scorpion -- Description: Deals damage to a single target. Additional Effect : Knockback (7) --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee, used by Nightmare Scorpions, KV, Serket +-- Notes: Used by Nightmare Scorpions, King Vinegarroon, Serket ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,15 +12,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ATK_VARIES, 1.5, 1.5, 1.5, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.attackMultiplier = { 1.5, 1.5, 1.5 } + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/cronos_sling_eta.lua b/scripts/actions/mobskills/cronos_sling_eta.lua index 4dded6305be..9dc07c34837 100644 --- a/scripts/actions/mobskills/cronos_sling_eta.lua +++ b/scripts/actions/mobskills/cronos_sling_eta.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Cronos Sling: Eta --- Deals damage in a fan-shaped area of effect. +-- Family: Exoplates +-- Description: Deals conal AoE damage in front of the mob. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,13 +15,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.25 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_2) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.25, 2.25, 2.25 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/cronos_sling_lambda.lua b/scripts/actions/mobskills/cronos_sling_lambda.lua index b692139d9da..05dffd8895c 100644 --- a/scripts/actions/mobskills/cronos_sling_lambda.lua +++ b/scripts/actions/mobskills/cronos_sling_lambda.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Cronos Sling: Lambda --- Deals damage in a fan-shaped area of effect. +-- Family: Exoplates +-- Description: Deals conal AoE damage in front of the mob. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,13 +15,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.75 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_2) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.75, 2.75, 2.75 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/cronos_sling_theta.lua b/scripts/actions/mobskills/cronos_sling_theta.lua index b38a592f2c7..dcafd44b0ba 100644 --- a/scripts/actions/mobskills/cronos_sling_theta.lua +++ b/scripts/actions/mobskills/cronos_sling_theta.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Cronos Sling: Theta --- Deals damage in a fan-shaped area of effect. +-- Family: Exoplates +-- Description: Deals conal AoE damage in front of the mob. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,13 +15,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.5 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_2) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.5, 2.5, 2.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/cross_attack.lua b/scripts/actions/mobskills/cross_attack.lua index 4fc0cb35a91..590883b4108 100644 --- a/scripts/actions/mobskills/cross_attack.lua +++ b/scripts/actions/mobskills/cross_attack.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Cross Attack --- Hits a single target twice in a cross motion. +-- Family: Sea Monk +-- Description: Hits a single target twice in a cross motion. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,13 +11,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 2 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ATK_VARIES, 1.5, 1.5, 1.5) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.HTH, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.HTH) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.HTH + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 + params.attackMultiplier = { 1.5, 1.5, 1.5 } + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/cross_reaver.lua b/scripts/actions/mobskills/cross_reaver.lua index 20c31d8e41e..f7638db32ea 100644 --- a/scripts/actions/mobskills/cross_reaver.lua +++ b/scripts/actions/mobskills/cross_reaver.lua @@ -1,11 +1,8 @@ ----------------------------------- --- Cross Reaver --- --- Description: Deals high damage to players in a fan-shaped area. Additional effect: Stun --- Type: Physical --- ? ? ? (No data offered) --- Range: Melee --- Special weaponskill unique to Ark Angel HM. Deals ~500-900 damage. +-- Cross Reaver +-- Family: Humanoid (Ark Angel HM) +-- Description: Deals high damage to players in a fan-shaped area. Additional Effect: Stun +-- Notes: Special weaponskill unique to Ark Angel HM. Deals ~500-900 damage. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,18 +12,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) + local params = {} + -- TODO: Can skillchain? Unknown property. - local numhits = 2 - local accmod = 1 - local ftp = 4 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_2) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 2 + params.fTP = { 4.0, 4.0, 4.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 4) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) -- TODO: Capture stun duration + end - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/crossthrash.lua b/scripts/actions/mobskills/crossthrash.lua index d4c2822d39a..6347101c3d9 100644 --- a/scripts/actions/mobskills/crossthrash.lua +++ b/scripts/actions/mobskills/crossthrash.lua @@ -1,7 +1,7 @@ ----------------------------------- --- Crossthrash --- Description: Damages enemies in a fan shaped area. Additional effect: Knockback --- Range : 14' +-- Crossthrash +-- Family: Tiger +-- Description: Damages enemies in a fan shaped area. Additional Effect: Dispel, Knockback ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,13 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + target:dispelStatusEffect() + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/cyclotail.lua b/scripts/actions/mobskills/cyclotail.lua index 261a9411e88..351b1b1fb23 100644 --- a/scripts/actions/mobskills/cyclotail.lua +++ b/scripts/actions/mobskills/cyclotail.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Cyclotail --- Deals damage in an area of effect. +-- Family: Eft +-- Description: Deals damage in an area of effect. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_3) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/damnation_dive.lua b/scripts/actions/mobskills/damnation_dive.lua index b184b7c4418..b4b7d1dee66 100644 --- a/scripts/actions/mobskills/damnation_dive.lua +++ b/scripts/actions/mobskills/damnation_dive.lua @@ -1,11 +1,8 @@ ----------------------------------- -- Damnation Dive --- Description: Deals physical damage to targets in a fan-shaped area of effect. Additional effect: Stun +-- Family: Lesser Bird +-- Description: Deals physical damage to targets in a fan-shaped area of effect. Additional Effect: Stun -- Notorious Monster / Nightmare version can critically strike and is handled in damnation_dive_nm.lua --- Type: Physical (Slashing) --- Utsusemi/Blink absorb: 3 shadows --- Range: Melee --- Notes: Used instead of Gliding Spike by certain notorious monsters. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -17,7 +14,7 @@ local mobskillObject = {} ----------------------------------- mobskillObject.onMobSkillCheck = function(target, mob, skill) if - mob:getFamily() == 122 and + mob:getFamily() == 122 and -- TODO: Split this off into its own mobskill script. mob:getAnimationSub() ~= 3 then return 1 @@ -27,16 +24,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_3, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 15) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 15) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/damnation_dive_nm.lua b/scripts/actions/mobskills/damnation_dive_nm.lua index a25fe638776..2c2d5e77c40 100644 --- a/scripts/actions/mobskills/damnation_dive_nm.lua +++ b/scripts/actions/mobskills/damnation_dive_nm.lua @@ -1,9 +1,7 @@ ----------------------------------- -- Damnation Dive (Notorious Monsters / Nightmare version) --- Description: Deals physical damage to targets in a fan-shaped area of effect. Additional effect: Stun - Can critically strike. --- Type: Physical (Slashing) --- Utsusemi/Blink absorb: 3 shadows --- Range: Melee +-- Family: Lesser Bird +-- Description: Deals physical damage to targets in a fan-shaped area of effect. Additional Effect: Stun - Can critically strike. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,17 +11,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_3, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 15) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 15) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/dancing_edge.lua b/scripts/actions/mobskills/dancing_edge.lua index 23d44ac32f1..655402a816c 100644 --- a/scripts/actions/mobskills/dancing_edge.lua +++ b/scripts/actions/mobskills/dancing_edge.lua @@ -1,8 +1,7 @@ ----------------------------------- -- Dancing Edge --- Delivers a fivefold attack --- Type: Physical --- Range: Melee +-- Family: Humanoid Dagger Weaponskill +-- Description: Delivers a fivefold attack ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,16 +11,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 5 - local ftp = 1 - local tp = skill:getTP() - local accmod = 0.8 + 0.1 * math.floor((tp - 1000) / 1000) - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 5 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_5 + -- TODO: Possible accuracy modifier, need captures. - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/daybreak.lua b/scripts/actions/mobskills/daybreak.lua index eea824c0c47..b111f86997c 100644 --- a/scripts/actions/mobskills/daybreak.lua +++ b/scripts/actions/mobskills/daybreak.lua @@ -1,5 +1,6 @@ ----------------------------------- -- Daybreak +-- Family: Humanoid (August) -- Description: 1 min 30 sec duration, 1 min 30 sec cooldown after either No quater used or daybreak wears off -- When August's HP drops below 66%, he uses Daybreak if it's available which partially restores some HP and MP, -- resets his TP, and activates an aura with wings of light @@ -15,9 +16,6 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - skill:setFinalAnimationSub(5) - local hpHeal = mob:getMainLvl() * 7 - local mpHeal = mob:getMainLvl() * 7 local params = {} params.baseDamage = mob:getMainLvl() + 2 @@ -33,6 +31,9 @@ mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) target:takeDamage(info.damage, mob, info.attackType, info.damageType) end + local hpHeal = mob:getMainLvl() * 7 + local mpHeal = mob:getMainLvl() * 7 + mob:eraseAllStatusEffect() -- erase all negetive effects mob:addHP(hpHeal) -- restore hp mob:addMP(mpHeal) -- restore mp @@ -40,6 +41,8 @@ mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) mob:setTP(0) -- daybreak uses all tp, so set to 0 mob:setLocalVar('DaybreakUsed', 1) + skill:setFinalAnimationSub(5) + return info.damage end diff --git a/scripts/actions/mobskills/deadly_drive.lua b/scripts/actions/mobskills/deadly_drive.lua index db19b7d8f6e..c8a2467bba0 100644 --- a/scripts/actions/mobskills/deadly_drive.lua +++ b/scripts/actions/mobskills/deadly_drive.lua @@ -1,8 +1,7 @@ ----------------------------------- -- Deadly Drive +-- Family: Wyvern -- Description: Deals heavy damage to a single target. --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,14 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.5 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.5, 2.5, 2.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/deadly_hold.lua b/scripts/actions/mobskills/deadly_hold.lua index 3f83cb8f82f..40691d75388 100644 --- a/scripts/actions/mobskills/deadly_hold.lua +++ b/scripts/actions/mobskills/deadly_hold.lua @@ -1,10 +1,7 @@ ----------------------------------- --- Deadly Hold --- --- Description: Deals critical damage to a single target. --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Deadly Hold +-- Family: Manticore +-- Description: Deals critical damage to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,14 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ATK_VARIES, 2, 2, 2, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.attackMultiplier = { 2.0, 2.0, 2.0 } + params.canCrit = true + params.criticalChance = { 0.30, 0.30, 0.30 } + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/deal_out.lua b/scripts/actions/mobskills/deal_out.lua index 9a77c928b55..a63374807a8 100644 --- a/scripts/actions/mobskills/deal_out.lua +++ b/scripts/actions/mobskills/deal_out.lua @@ -1,10 +1,7 @@ ----------------------------------- --- Deal Out --- --- Description: Damages enemies in an area of effect. --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows --- Range: 10' radial +-- Deal Out +-- Family: Cardian +-- Description: Damages enemies in an area of effect. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,18 +11,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_3) - - if mob:isMobType(xi.mobType.NOTORIOUS) then - mob:resetEnmity(target) + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + if mob:isMobType(xi.mobType.NOTORIOUS) then + mob:resetEnmity(target) + end end - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/death_scissors.lua b/scripts/actions/mobskills/death_scissors.lua index e2590c37f5a..43d56f10f62 100644 --- a/scripts/actions/mobskills/death_scissors.lua +++ b/scripts/actions/mobskills/death_scissors.lua @@ -1,7 +1,7 @@ ----------------------------------- --- Death Scissors --- Description: Damage varies with TP. --- Type: Physical (Slashing) +-- Death Scissors +-- Family: Scorpion +-- Description: Damage varies with TP. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,15 +11,29 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 4 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ATK_VARIES, 2.5, 2.5, 2.5, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 4.0, 4.0, 4.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.attackMultiplier = { 2.5, 2.5, 2.5 } + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + if mob:getPool() == xi.mobPool.KING_VINEGARROON then + params.criticalChance = { 1.00, 1.00, 1.00 } + end + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/deathgnash.lua b/scripts/actions/mobskills/deathgnash.lua index 78483e0bcdc..6a544928dc8 100644 --- a/scripts/actions/mobskills/deathgnash.lua +++ b/scripts/actions/mobskills/deathgnash.lua @@ -1,7 +1,7 @@ ----------------------------------- -- Deathgnash +-- Family: Orobon -- Description: Chomps on a single target, reducing HP to one and resets enmity. --- Type: Physical ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,17 +11,31 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local damage = target:getHP() - 1 - local info = - { - damage = damage - } + local params = {} - damage = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, xi.mobskills.shadowBehavior.IGNORE_SHADOWS) - target:takeDamage(damage, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - mob:resetEnmity(target) + params.baseDamage = target:getHP() - 1 -- TODO: Jpwiki says there is sometimes variance in damage that might suggest resists of some sort. + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS + params.skipFSTR = true + params.skipPDIF = true + params.skipParry = true -- TODO: Confirm this can't be parried, guarded or blocked. + params.skipGuard = true + params.skipBlock = true - return damage + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + -- TODO: Capture hate reset type (Enmity wipe vs enmity turned off) + -- See Antica skill "Sand Trap" for reference + mob:resetEnmity(target) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/debonair_rush.lua b/scripts/actions/mobskills/debonair_rush.lua index 57eb6c3fcc8..4f91b921929 100644 --- a/scripts/actions/mobskills/debonair_rush.lua +++ b/scripts/actions/mobskills/debonair_rush.lua @@ -1,8 +1,7 @@ ----------------------------------- -- Debonair Rush +-- Family: Humanoid (Lehko Habhoka) -- Description: Damage varies with TP. --- Type: Physical --- Utsusemi/Blink absorb: One shadow ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.0 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/decollation.lua b/scripts/actions/mobskills/decollation.lua index ec472188277..c1dd7f0b4fa 100644 --- a/scripts/actions/mobskills/decollation.lua +++ b/scripts/actions/mobskills/decollation.lua @@ -1,9 +1,7 @@ ----------------------------------- -- Decollation +-- Family: Vampyr -- Description: Deals physical damage to all targets in a cone in front of the user. Chance of critical varies with TP. --- Type: Physical --- Utsusemi/Blink absorb: 3 shadows --- Range: Frontal Cone ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 2 - -- TODO: Need crit scaling captures - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.CRIT_VARIES, 1, 1, 1) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_3) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture fTPs + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/decussate.lua b/scripts/actions/mobskills/decussate.lua index 7c7729c62f8..7bc611ffe3f 100644 --- a/scripts/actions/mobskills/decussate.lua +++ b/scripts/actions/mobskills/decussate.lua @@ -1,19 +1,14 @@ ----------------------------------- --- Decussate --- --- Description: Performs a cross attack on nearby targets. --- Type: Magical --- Utsusemi/Blink absorb: 2-3 shadows? --- Range: Less than or equal to 10.0 --- Notes: Unlocked at 20% hp --- --- TODO: Umeboshi: "This is a physical skill, will adjust in mobPhysicalMove() pass" +-- Decussate +-- Family: Mamool Ja (Two Headed Mamool Ja) +-- Description: Performs a cross attack on nearby targets. +-- Notes: Unlocked at 20% hp ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - if mob:getHPP() > 20 then + if mob:getHPP() > 20 then -- TODO: Handle in mob script return 1 end @@ -23,14 +18,14 @@ end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) local params = {} - params.baseDamage = mob:getMainLvl() + 2 - params.fTP = { 3.0, 3.0, 3.0 } - params.element = xi.element.EARTH - params.attackType = xi.attackType.MAGICAL - params.damageType = xi.damageType.EARTH - params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 -- TODO: Capture numHits + params.fTP = { 3.0, 3.0, 3.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - local info = xi.mobskills.mobMagicalMove(mob, target, skill, action, params) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) if xi.mobskills.processDamage(mob, target, skill, action, info) then target:takeDamage(info.damage, mob, info.attackType, info.damageType) diff --git a/scripts/actions/mobskills/delta_thrust.lua b/scripts/actions/mobskills/delta_thrust.lua index 8855a4d44ad..e34ce275fea 100644 --- a/scripts/actions/mobskills/delta_thrust.lua +++ b/scripts/actions/mobskills/delta_thrust.lua @@ -1,8 +1,7 @@ ----------------------------------- --- Delta Thrust --- --- Description: Delivers a threefold attack on a single target. Additional effect: Plague --- Type: Physical (Slashing) +-- Delta Thrust +-- Family: Peist +-- Description: Delivers a threefold attack on a single target. Additional Effect: Plague ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.PLAGUE, 5, 3, 60) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PLAGUE, 5, 3, 60) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/di_bite_attack.lua b/scripts/actions/mobskills/di_bite_attack.lua index 36abdd78c53..2a2d0aa221d 100644 --- a/scripts/actions/mobskills/di_bite_attack.lua +++ b/scripts/actions/mobskills/di_bite_attack.lua @@ -1,7 +1,8 @@ ----------------------------------- -- Dark Ixion basic melee attack with mouth --- Note: Has basic autoattack-style messages, consumes no TP, and applies WEIGHT effect --- normal tp gain is applied since the skill is used in place of an autoattack +-- Family: Monoceros +-- Notes: Has basic autoattack-style messages, consumes no TP, and applies Weight effect +-- Normal tp gain is applied since the skill is used in place of an autoattack ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,30 +12,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - -- parameters for AE - local typeEffect = xi.effect.WEIGHT - local power = 50 -- TODO confirm power - local duration = math.random(3, 15) - - -- perform physical attack - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - - -- if skill hit, apply dmg and AE - if not skill:hasMissMsg() then - skill:setMsg(xi.msg.basic.HIT_DMG) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, typeEffect, power, 0, duration) - elseif dmg == 0 then - -- basic miss (not shadows or anticipation) - skill:setMsg(xi.msg.basic.EVADES) + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.primaryMessage = xi.msg.basic.HIT_DMG + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.WEIGHT, 50, 0, math.random(3, 15)) -- TODO: Capture power end - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/di_horn_attack.lua b/scripts/actions/mobskills/di_horn_attack.lua index 249221ba470..6b353bae235 100644 --- a/scripts/actions/mobskills/di_horn_attack.lua +++ b/scripts/actions/mobskills/di_horn_attack.lua @@ -1,7 +1,8 @@ ----------------------------------- -- Dark Ixion basic melee attack with horn --- Note: Has basic autoattack-style messages, consumes no TP, and applies BIND effect --- normal tp gain is applied since the skill is used in place of an autoattack +-- Family: Monoceros +-- Notes: Has basic autoattack-style messages, consumes no TP, and applies Bind effect +-- Normal tp gain is applied since the skill is used in place of an autoattack ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,30 +12,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - -- parameters for AE - local typeEffect = xi.effect.BIND - local power = 1 - local duration = math.random(3, 15) - - -- perform physical attack - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) - - -- if skill hit, apply dmg and AE - if not skill:hasMissMsg() then - skill:setMsg(xi.msg.basic.HIT_DMG) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, typeEffect, power, 0, duration) - elseif dmg == 0 then - -- basic miss (not shadows or anticipation) - skill:setMsg(xi.msg.basic.EVADES) + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.primaryMessage = xi.msg.basic.HIT_DMG + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIND, 1, 0, math.random(3, 15)) -- TODO: Capture power end - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/di_kick_attack.lua b/scripts/actions/mobskills/di_kick_attack.lua index 7f2147ebedd..2d4718a8654 100644 --- a/scripts/actions/mobskills/di_kick_attack.lua +++ b/scripts/actions/mobskills/di_kick_attack.lua @@ -1,8 +1,9 @@ ----------------------------------- -- Dark Ixion basic melee attack with front legs +-- Family: Monoceros -- Note: Has basic autoattack-style messages, consumes no TP (and applies ??? effect?) --- normal tp gain is applied since the skill is used in place of an autoattack --- TODO does this attack have an AE? other two do but there are no reports of a third AE type, nor have any videos shown an AE coming from the kick attack +-- Normal tp gain is applied since the skill is used in place of an autoattack +-- TODO: does this attack have an AE? The other two do but there are no reports of a third AE type, nor have any videos shown an AE coming from the kick attack ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,23 +13,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - -- perform physical attack - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - -- if skill hit, apply dmg and AE - if not skill:hasMissMsg() then - skill:setMsg(xi.msg.basic.HIT_DMG) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - elseif dmg == 0 then - -- basic miss (not shadows or anticipation) - skill:setMsg(xi.msg.basic.EVADES) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.primaryMessage = xi.msg.basic.HIT_DMG + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) end - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/di_trample.lua b/scripts/actions/mobskills/di_trample.lua index d21a58e8b3e..63245ae3c2d 100644 --- a/scripts/actions/mobskills/di_trample.lua +++ b/scripts/actions/mobskills/di_trample.lua @@ -1,7 +1,9 @@ ----------------------------------- --- Trample: Charges forward, dealing high damage to,(400-1000) and lowering the MP (10-30%) of, anyone in his path. --- No message is displayed in the chat log. --- Video showing 25% mp lost on hit: https://youtu.be/Jj9pWfSr1c0?t=26 +-- Auto Attack: Trample +-- Family: Monoceros +-- Description: Charges forward, dealing high damage to,(400-1000) and lowering the MP (10-30%) of, anyone in its path. +-- Notes: No message is displayed in the chat log. +-- Video showing 25% mp lost on hit: https://youtu.be/Jj9pWfSr1c0?t=26 -- -- This move is triggered during onMobFight and is only advertised by the fact that DI runs towards random players in range and has dust under his feet -- @@ -19,26 +21,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - -- perform physical attack - local numhits = 1 - local accmod = 1 - local ftp = 3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) - - -- if skill hit, apply dmg and reduce MP - if not skill:hasMissMsg() then - local remainingMPP = 1 - math.random(10, 30) / 100 + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } + params.attackType = xi.attackType.RANGED + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 -- TODO: Capture shadowBehavior + params.primaryMessage = xi.msg.basic.HIT_DMG + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - target:takeDamage(dmg, mob, xi.attackType.RANGED, xi.damageType.PIERCING) + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + local remainingMPP = 1 - math.random(10, 30) / 100 target:setMP(target:getMP() * remainingMPP) - skill:setMsg(xi.msg.basic.HIT_DMG) - elseif dmg == 0 then - -- basic miss (not shadows or anticipation) - skill:setMsg(xi.msg.basic.EVADES) end - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/dimensional_death.lua b/scripts/actions/mobskills/dimensional_death.lua index 2a072e2c3d1..c409b41415e 100644 --- a/scripts/actions/mobskills/dimensional_death.lua +++ b/scripts/actions/mobskills/dimensional_death.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Dimensional Death --- Damage varies with TP. +-- Family: Shadow +-- Description: Damage varies with TP. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.25 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.HTH, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.HTH) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.25, 2.25, 2.25 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.HTH + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/dirty_claw.lua b/scripts/actions/mobskills/dirty_claw.lua index 6aaf3e6adc6..939d5a30c05 100644 --- a/scripts/actions/mobskills/dirty_claw.lua +++ b/scripts/actions/mobskills/dirty_claw.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Dirty Claw --- Deals damage to a single target. +-- Family: Hounds +-- Description: Deals damage to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,14 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/disseverment.lua b/scripts/actions/mobskills/disseverment.lua index c600f7f2bbb..9832f25a2b1 100644 --- a/scripts/actions/mobskills/disseverment.lua +++ b/scripts/actions/mobskills/disseverment.lua @@ -1,7 +1,7 @@ ----------------------------------- --- Disseverment --- Description: Delivers a fivefold attack. Additional effect: Poison. Accuracy varies with TP. --- Type: Physical (Piercing) +-- Disseverment +-- Family: Aern +-- Description: Delivers a fivefold attack. Additional Effect: Poison. Accuracy varies with TP. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,16 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 5 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ACC_VARIES, 1, 2, 3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.POISON, 19, 3, 180) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 5 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_5 + -- TODO: Possible accuracy modifier - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.POISON, 19, 3, 180) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/divesting_stampede.lua b/scripts/actions/mobskills/divesting_stampede.lua index 5081b5c25e8..bbc2ff44780 100644 --- a/scripts/actions/mobskills/divesting_stampede.lua +++ b/scripts/actions/mobskills/divesting_stampede.lua @@ -1,5 +1,7 @@ ----------------------------------- -- Divesting Stampede +-- Family: Yztarg +-- Description: AoE Physical damage. Additional Effect: Defense Down, Knockback, Magic Defense Down ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -9,17 +11,28 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.0 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.MAGIC_DEF_DOWN, 30, 0, 60) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.DEFENSE_DOWN, 30, 0, 60) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - return dmg + -- TODO: Capture knockback power + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + -- TODO: Capture power/durations + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.MAGIC_DEF_DOWN, 30, 0, 60) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.DEFENSE_DOWN, 30, 0, 60) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/dominion_slash.lua b/scripts/actions/mobskills/dominion_slash.lua index 0d2e3269339..68d70b4de50 100644 --- a/scripts/actions/mobskills/dominion_slash.lua +++ b/scripts/actions/mobskills/dominion_slash.lua @@ -1,10 +1,8 @@ ----------------------------------- -- Dominion Slash --- Description: Performs an area of effect slashing weaponskill. Additional effect: Silence --- Type: Physical --- 2-3 Shadows --- Range: Unknown radial --- One source also mentions that it "can dispel important buffs." +-- Family: Humanoid (Ark Angel EV) +-- Description: Performs an area of effect slashing weaponskill. Additional Effect: Silence +-- Notes?: One source also mentions that it "can dispel important buffs." ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,28 +12,35 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) + local params = {} + -- TODO: Can skillchain? Unknown property. - local numhits = 1 - local accmod = 1 - local ftp = 3.25 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_2) - - -- Damage is HIGHLY conflicting. Witnessed anywhere from 300 to 900. - -- TP DMG VARIES can sort of account for this, but I feel like it's still not right. - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - - -- Due to conflicting information, making the dispel resistable. Correct/tweak if wrong. - -- Dispel has no status effect or resistance gear, so 0s instead of nulls. - local resistRate = xi.combat.magicHitRate.calculateResistRate(mob, target, 0, 0, 0, xi.element.LIGHT, xi.mod.INT, xi.effect.NONE, 0) - if resistRate >= 0.25 then - target:dispelStatusEffect() - end + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.25, 3.25, 3.25 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) - xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.SILENCE, 1, 0, 60) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.SILENCE, 1, 0, 60) + + -- TODO: Capture/verify this mechanic. If real, check to see if it can resist. We should probably make a new function for this is it can be resisted. + -- Due to conflicting information, making the dispel resistable. Correct/tweak if wrong. + -- Dispel has no status effect or resistance gear, so 0s instead of nulls. + local resistRate = xi.combat.magicHitRate.calculateResistRate(mob, target, 0, 0, 0, xi.element.LIGHT, xi.mod.INT, xi.effect.NONE, 0) + + if resistRate >= 0.25 then + target:dispelStatusEffect() + end + end - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/double_claw.lua b/scripts/actions/mobskills/double_claw.lua index 2d85616dd59..bb8f3bc2d61 100644 --- a/scripts/actions/mobskills/double_claw.lua +++ b/scripts/actions/mobskills/double_claw.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Double Claw --- Single target damage +-- Family: Diremite +-- Description: Single target physical damage. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.4 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 -- TODO: Capture numHits + params.fTP = { 1.5, 1.5, 1.5 } -- TODO: Capture fTP scalings + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 -- TODO: captureshadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/double_down.lua b/scripts/actions/mobskills/double_down.lua index 8c3453dc3da..8c2e9945e1a 100644 --- a/scripts/actions/mobskills/double_down.lua +++ b/scripts/actions/mobskills/double_down.lua @@ -1,16 +1,13 @@ ----------------------------------- -- Double Down --- Deals damage to a single target. --- Type: Physical --- Can be dispelled: N/A --- Utsusemi/Blink absorb: Ignore shadows --- Range: Melee +-- Family: Cardian +-- Description: Deals damage to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - if not mob:isNM() then + if not mob:isNM() then -- TODO: Set proper skill lists return 1 end @@ -18,13 +15,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ATK_VARIES, 2.0, 2.0, 2.0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.attackMultiplier = { 2.0, 2.0, 2.0 } + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/double_kick.lua b/scripts/actions/mobskills/double_kick.lua index a2660dcb894..f86dae63ec9 100644 --- a/scripts/actions/mobskills/double_kick.lua +++ b/scripts/actions/mobskills/double_kick.lua @@ -1,10 +1,7 @@ ----------------------------------- --- Double Kick --- Description: Deals damage to a single target. Additional effect: Stun --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee --- Notes: Stun may or may not take xi.effect. +-- Double Kick +-- Family: Yagudo +-- Description: Deals damage to a single target. Additional Effect: Knockback, Stun ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 2 - local accmod = 1 - local ftp = 0.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 4) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 2 + params.fTP = { 0.5, 0.5, 0.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 -- TODO: Capture shadowBehavior - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) -- TODO: Capture duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/double_punch.lua b/scripts/actions/mobskills/double_punch.lua index 18ae8eb1ab0..36f2cdf49c9 100644 --- a/scripts/actions/mobskills/double_punch.lua +++ b/scripts/actions/mobskills/double_punch.lua @@ -1,4 +1,8 @@ ----------------------------------- +-- Double Punch +-- Family: Avatar (Ifrit) +-- Description: Delivers a two fold attack. +----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -7,13 +11,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 2 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.CRIT_VARIES, 1, 2, 3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 2 + params.fTP = { 1.0, 1.0, 1.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 + -- TODO: Check for to see if it can crit. + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/double_slap.lua b/scripts/actions/mobskills/double_slap.lua index 96d8fb90b96..d8742b48bfe 100644 --- a/scripts/actions/mobskills/double_slap.lua +++ b/scripts/actions/mobskills/double_slap.lua @@ -1,4 +1,8 @@ ----------------------------------- +-- Double Slap +-- Family: Avatar (Shiva) +-- Description: Delivers a two fold attack. +----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -7,14 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 2 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 2 + params.fTP = { 1.0, 1.0, 1.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/dragon_kick.lua b/scripts/actions/mobskills/dragon_kick.lua index 19f9d3ec35b..049a3b94e12 100644 --- a/scripts/actions/mobskills/dragon_kick.lua +++ b/scripts/actions/mobskills/dragon_kick.lua @@ -1,6 +1,7 @@ ----------------------------------- --- Dragon Kick --- Type: Physical +-- Dragon Kick +-- Family: Humanoid Hand to Hand Weaponskill +-- Description: ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,13 +11,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 -- TODO: Capture numHits + params.fTP = { 3.0, 3.0, 3.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT -- TODO: Should this be xi.damageType.HTH? + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 -- TODO: Capture shadowBehavior + -- TODO: Does Kick Attack modifiers apply to this? + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/dragonfall.lua b/scripts/actions/mobskills/dragonfall.lua index ec14f681414..f9ab4e052d2 100644 --- a/scripts/actions/mobskills/dragonfall.lua +++ b/scripts/actions/mobskills/dragonfall.lua @@ -1,11 +1,8 @@ ----------------------------------- --- Dragonfall --- --- Description: Deals damage to players an area of effect. Additional effect: Bind --- Type: Physical --- 2-3 Shadows --- Range: Melee --- Special weaponskill unique to Ark Angel GK. Deals ~100-300 damage. +-- Dragonfall +-- Family: Humanoid (Ark Angel GK) +-- Description: Deals damage to players an area of effect. Additional Effect: Bind +-- Notes: Special weaponskill unique to Ark Angel GK. Deals ~100-300 damage. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,18 +12,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) + local params = {} + -- TODO: Can skillchain? Unknown property. - local numhits = 1 - local accmod = 1 - local ftp = 2.7 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, xi.mobskills.shadowBehavior.NUMSHADOWS_2) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.7, 2.7, 2.7 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType, { breakBind = false }) - xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIND, 1, 0, 30) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIND, 1, 0, 30) + end - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING, { breakBind = false }) - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/dread_dive.lua b/scripts/actions/mobskills/dread_dive.lua index f578aff4ca3..fa1c98779f5 100644 --- a/scripts/actions/mobskills/dread_dive.lua +++ b/scripts/actions/mobskills/dread_dive.lua @@ -1,10 +1,7 @@ ----------------------------------- -- Dread Dive --- --- Description: Dives into a single target. Additional effect: Knockback + Stun --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Family: Roc +-- Description: Dives into a single target. Additional Effect: Knockback, Stun ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,17 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 4) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) -- TODO: Capture stun duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/drill_branch.lua b/scripts/actions/mobskills/drill_branch.lua index e04e785e562..d2cc8587507 100644 --- a/scripts/actions/mobskills/drill_branch.lua +++ b/scripts/actions/mobskills/drill_branch.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Drill Branch --- Description: Deals physical damage to enemies in a fan-shaped area. Additional effect: Blindness. --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows --- Range: 15' fan-shaped area +-- Drill Branch +-- Family: Treant +-- Description: Deals conal AoE physical damage to targets in front of mob. Additional Effect: Blindness. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded * math.random(2, 3)) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BLINDNESS, 50, 0, 45) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BLINDNESS, 50, 0, 45) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/drill_branch_nm.lua b/scripts/actions/mobskills/drill_branch_nm.lua index 6478ab8a4dc..7f27cc400ea 100644 --- a/scripts/actions/mobskills/drill_branch_nm.lua +++ b/scripts/actions/mobskills/drill_branch_nm.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Drill Branch (NM Variant) --- Description: Deals physical damage to enemies in a fan-shaped area. Additional effect: Blindness. --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows --- Range: 15' fan-shaped area +-- Drill Branch (NM Variant) +-- Family: Treant +-- Description: Deals conal AoE physical damage to targets in front of mob. Additional Effect: Blindness. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded * math.random(2, 3)) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BLINDNESS, 50, 0, 45) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.5, 2.5, 2.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BLINDNESS, 50, 0, 45) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/drill_claw.lua b/scripts/actions/mobskills/drill_claw.lua index 44a6b25ae3d..7706c352392 100644 --- a/scripts/actions/mobskills/drill_claw.lua +++ b/scripts/actions/mobskills/drill_claw.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Drill Claw --- Physical damage + Max HP Down + Max TP Down. +-- Family: Meeble +-- Description: Single target physical damage. Additional Effect: Max HP Down, Max TP Down. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,17 +11,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.0 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.MAX_HP_DOWN, 50, 0, 60) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.MAX_TP_DOWN, 50, 0, 60) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + -- TODO: Capture effect power/durations + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.MAX_HP_DOWN, 50, 0, 60) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.MAX_TP_DOWN, 50, 0, 60) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/drop_hammer.lua b/scripts/actions/mobskills/drop_hammer.lua index 8c038b11629..15742535acc 100644 --- a/scripts/actions/mobskills/drop_hammer.lua +++ b/scripts/actions/mobskills/drop_hammer.lua @@ -1,11 +1,8 @@ ----------------------------------- --- Drop Hammer --- --- Description: Drops the hammer. Additional effect: Bind --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows? --- Range: Melee --- Notes: Only used by "destroyers" (carrying massive warhammers). +-- Drop Hammer +-- Family: Troll +-- Description: Deals AoE physical damage to targets in range. Additional Effect: Bind +-- Notes: Only used by "destroyers" (carrying massive warhammers). ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,21 +12,28 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.4 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded * math.random(2, 3)) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BIND, 1, 0, 60) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.4, 2.4, 2.4 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - if mob:getPool() == xi.mobPool.FAHRAFAHR_THE_BLOODIED then -- Fahrafahr the Bloodied - mob:resetEnmity(target) + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType, { breakBind = false }) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIND, 1, 0, 60) + + if mob:getPool() == xi.mobPool.FAHRAFAHR_THE_BLOODIED then + mob:resetEnmity(target) + end end - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/dual_strike.lua b/scripts/actions/mobskills/dual_strike.lua index 104213a96ae..25ddd4515a7 100644 --- a/scripts/actions/mobskills/dual_strike.lua +++ b/scripts/actions/mobskills/dual_strike.lua @@ -1,12 +1,7 @@ ----------------------------------- -- Dual Strike --- -- Family: Xzomit --- Type: Physical --- Can be dispelled: N/A --- Utsusemi/Blink absorb: 2 shadows --- Range: Melee --- Notes: Double attacks a single target. Additional effect: Stun +-- Description: Delivers a two fold attack to a single target. Additional Effect: Stun ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -16,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 2 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.NONE, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.NONE) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 4) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 2 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.NONE -- TODO: Capture damageType + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) -- TODO: Capture stun duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/dynamic_assault.lua b/scripts/actions/mobskills/dynamic_assault.lua index b6d67e5ad47..da995f0cfe6 100644 --- a/scripts/actions/mobskills/dynamic_assault.lua +++ b/scripts/actions/mobskills/dynamic_assault.lua @@ -1,9 +1,8 @@ ----------------------------------- --- Dynamic Assault --- Description: Deals damage to a single player. --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Dynamic Assault +-- Family: Shadow Lord +-- Description: Deals damage to a single target. +-- Notes: Used by Dynamis Lord ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,15 +12,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.5 -- fTP and fTP scaling unknown. TODO: capture ftp + local params = {} - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_1) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.5, 2.5, 2.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 -- TODO: Capture shadowBehavior - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/dynamic_implosion.lua b/scripts/actions/mobskills/dynamic_implosion.lua index 2ff7f347383..f708568e109 100644 --- a/scripts/actions/mobskills/dynamic_implosion.lua +++ b/scripts/actions/mobskills/dynamic_implosion.lua @@ -1,9 +1,8 @@ ----------------------------------- --- Dynamic Implosion --- Description: Deals damage to players within an area of effect. Additional effect: Stun (Status Effect) --- Type: Physical --- Utsusemi/Blink absorb: Unknown --- Range: Unknown radial +-- Dynamic Implosion +-- Family: Shadow Lord +-- Description: Deals damage to players within an area of effect. Additional Effect: Stun +-- Notes: Used by Dynamis Lord ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,17 +12,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.5 -- fTP and fTP scaling unknown. TODO: capture ftp + local params = {} - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.5, 2.5, 2.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 7) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 7) -- TODO: Capture stun duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/eagle_eye_shot.lua b/scripts/actions/mobskills/eagle_eye_shot.lua index caeaf881e67..b3bfcadd28b 100644 --- a/scripts/actions/mobskills/eagle_eye_shot.lua +++ b/scripts/actions/mobskills/eagle_eye_shot.lua @@ -9,22 +9,29 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 2 - local dmgmod = 9 + math.random() - - local info = xi.mobskills.mobRangedMove(mob, target, skill, numhits, accmod, dmgmod, xi.mobskills.magicalTpBonus.NO_EFFECT) - - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.RANGED, xi.damageType.PIERCING, info.hitslanded) - - if dmg > 0 then - target:addTP(20) - mob:addTP(80) + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 9.0, 9.0, 9.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.skipParry = true + params.skipGuard = true + params.skipBlock = true + -- TODO: Possible accuracy modifier + + -- https://wiki.ffo.jp/html/937.html + -- Note: shadowBehavior may vary depending on mob using skill + + local info = xi.mobskills.mobRangedMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) end - target:takeDamage(dmg, mob, xi.attackType.RANGED, xi.damageType.PIERCING) - - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/earth_shock.lua b/scripts/actions/mobskills/earth_shock.lua index 95f931ad208..02ccf6e59c9 100644 --- a/scripts/actions/mobskills/earth_shock.lua +++ b/scripts/actions/mobskills/earth_shock.lua @@ -1,8 +1,7 @@ ----------------------------------- --- Earthshock --- Creates a seismic wave to damage targets in an area of effect. Additional effect: Stun --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows +-- Earthshock +-- Family: Bugbear +-- Description: Creates a seismic wave to damage targets in an area of effect. Additional effect: Stun ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 2 - local ftp = 0.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, xi.mobskills.shadowBehavior.NUMSHADOWS_3) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 4) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 0.5, 0.5, 0.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) -- TODO: Capture stun duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/eclipse_bite.lua b/scripts/actions/mobskills/eclipse_bite.lua index c5bce242e53..9a49b9231b3 100644 --- a/scripts/actions/mobskills/eclipse_bite.lua +++ b/scripts/actions/mobskills/eclipse_bite.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Eclipse Bite --- Delivers a threefold attack. +-- Family: Avatar (Fenrir) +-- Description: Delivers a threefold attack. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/ectosmash.lua b/scripts/actions/mobskills/ectosmash.lua index aa45efde4d0..5e5c2880f9b 100644 --- a/scripts/actions/mobskills/ectosmash.lua +++ b/scripts/actions/mobskills/ectosmash.lua @@ -1,10 +1,9 @@ ----------------------------------- --- Ectosmash --- Description: Teleports to hit a single target. --- Type: Physical (Blunt) --- Utsusemi/Blink absorb: 1 Shadow --- Range: 15.0 yalms (May be further, needs additional testing) --- Notes: Mob is still set to same spot for attacks and abilities that deal with monster position, such as Sneak Attack and Cover. Monster will always return to this starting position after. +-- Ectosmash +-- Family: Ghost +-- Description: Teleports to hit a single target. +-- Notes: Mob is still set to same spot for attacks and abilities that deal with monster position, such as Sneak Attack and Cover. +-- Monster will always return to this starting position after. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,14 +13,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.0 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ATK_VARIES, 1.5, 1.5, 1.5, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.RANGED, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.RANGED, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.attackMultiplier = { 1.5, 1.5, 1.5 } + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/empty_beleaguer.lua b/scripts/actions/mobskills/empty_beleaguer.lua index 0f92415b93f..b65fcfa0960 100644 --- a/scripts/actions/mobskills/empty_beleaguer.lua +++ b/scripts/actions/mobskills/empty_beleaguer.lua @@ -1,7 +1,7 @@ ----------------------------------- -- Empty Beleaguer --- Deals damage in an area of effect. --- 100% TP: ??? / 200% TP: ??? / 300% TP: ??? +-- Family: Wanderer +-- Description: Deals damage in an area of effect. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_2) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/empty_crush.lua b/scripts/actions/mobskills/empty_crush.lua index ae2f993b6b0..4b37a24b2e7 100644 --- a/scripts/actions/mobskills/empty_crush.lua +++ b/scripts/actions/mobskills/empty_crush.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Empty Crush --- Deals damage to a single target. +-- Family: Seether +-- Description: Deals damage to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,15 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) + local params = {} - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/empty_cutter.lua b/scripts/actions/mobskills/empty_cutter.lua index b3d711c8416..03f51ed4426 100644 --- a/scripts/actions/mobskills/empty_cutter.lua +++ b/scripts/actions/mobskills/empty_cutter.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Empty Cutter --- Deals damage to a single target. +-- Family: Weeper +-- Description: Deals damage to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/empty_cutter_thinker.lua b/scripts/actions/mobskills/empty_cutter_thinker.lua index e896c763a21..f3c7c770787 100644 --- a/scripts/actions/mobskills/empty_cutter_thinker.lua +++ b/scripts/actions/mobskills/empty_cutter_thinker.lua @@ -1,6 +1,7 @@ ----------------------------------- --- Empty Cutter (Thinker mob family) --- Deals damage to a single target. +-- Empty Cutter +-- Family: Thinker +-- Description: Deals damage to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,14 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/empty_seed.lua b/scripts/actions/mobskills/empty_seed.lua index cc9df4b1f50..299a54f6f36 100644 --- a/scripts/actions/mobskills/empty_seed.lua +++ b/scripts/actions/mobskills/empty_seed.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Empty Seed --- Description: Deals physical damage to enemies within area of effect. --- Type: Physical --- Utsusemi/Blink absorb: 1-3 shadows --- Range: 20' radial +-- Empty Seed +-- Family: Memory Receptacle +-- Description: Deals physical damage to enemies within area of effect. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 0.75 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, xi.mobskills.shadowBehavior.NUMSHADOWS_2) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 0.75, 0.75, 0.75 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/empty_thrash.lua b/scripts/actions/mobskills/empty_thrash.lua index b0acfa87e4b..d37c1d5f054 100644 --- a/scripts/actions/mobskills/empty_thrash.lua +++ b/scripts/actions/mobskills/empty_thrash.lua @@ -1,12 +1,13 @@ ----------------------------------- -- Empty Thrash --- Deals damage to a single target. +-- Family: Craver +-- Description: Deals damage to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - if mob:isMobType(xi.mobType.NOTORIOUS) then + if mob:isMobType(xi.mobType.NOTORIOUS) then -- TODO: Set proper skill lists return 1 end @@ -14,13 +15,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + -- TODO: Possible accuracy modifier + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/entangle_drain.lua b/scripts/actions/mobskills/entangle_drain.lua index 9a1319bfcc5..df764ef3ce0 100644 --- a/scripts/actions/mobskills/entangle_drain.lua +++ b/scripts/actions/mobskills/entangle_drain.lua @@ -1,9 +1,7 @@ ----------------------------------- -- Entangle (HP Drain Variant) --- Description: Deals physical damage to a single target. Additional effect : Bind, HP Drain --- Type: Physical --- Utsusemi/Blink absorb: Ignores shadows --- Range: Melee +-- Family: Treant +-- Description: Deals physical damage to a single target. Additional Effect : Bind, HP Drain ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,15 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3.0 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded, xi.mobskills.shadowBehavior.IGNORE_SHADOWS) - - skill:setMsg(xi.mobskills.mobPhysicalDrainMove(mob, target, skill, xi.mobskills.drainType.HP, dmg)) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BIND, 1, 0, 60) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + skill:setMsg(xi.mobskills.mobDrainMove(mob, target, xi.mobskills.drainType.HP, info.damage)) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIND, 1, 0, 60) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/entangle_poison.lua b/scripts/actions/mobskills/entangle_poison.lua index 903bb8e9b10..d66c58e7374 100644 --- a/scripts/actions/mobskills/entangle_poison.lua +++ b/scripts/actions/mobskills/entangle_poison.lua @@ -1,9 +1,7 @@ ----------------------------------- -- Entangle (Poison & Enmity Reset Variant) --- Description: Deals physical damage to a single target. Additional effect : Bind, Poison, Enmity Reset --- Type: Enfeebling --- Utsusemi/Blink absorb: Ignores shadows --- Range: Melee +-- Family: Treant +-- Description: Deals physical damage to a single target. Additional Effect : Bind, Enmity Reset, Poison ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,17 +11,27 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3.0 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded, xi.mobskills.shadowBehavior.IGNORE_SHADOWS) - - mob:resetEnmity(target) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING, { breakBind = false }) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BIND, 1, 0, 60) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.POISON, 50, 3, 180) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType, { breakBind = false }) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIND, 1, 0, 60) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.POISON, 50, 3, 180) + + -- TODO: Confirm hate reset. May be specific to certain NMs + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/envoutement.lua b/scripts/actions/mobskills/envoutement.lua index 31fa90cc172..1c55f85855c 100644 --- a/scripts/actions/mobskills/envoutement.lua +++ b/scripts/actions/mobskills/envoutement.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Envoutement --- Description: Deals damage to a single target. Additional effect: Curse --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Envoutement +-- Family: Corse +-- Description: Deals damage to a single target. Additional Effect: Curse ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3.2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.CURSE_I, 25, 0, 420) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.2, 3.2, 3.2 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 -- TODO: Capture shadowBehavior - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, skill, xi.effect.CURSE_I, 25, 0, 180) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/equalizer.lua b/scripts/actions/mobskills/equalizer.lua index 50547a96967..d811efa195b 100644 --- a/scripts/actions/mobskills/equalizer.lua +++ b/scripts/actions/mobskills/equalizer.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Equalizer --- AoE damage (~600-800) +-- Family: Ultima +-- Description: AoE Physical damage to targets in range of mob. Addtional Effect: Knockback ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,14 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/evisceration.lua b/scripts/actions/mobskills/evisceration.lua index f076055c1a3..017ef87778e 100644 --- a/scripts/actions/mobskills/evisceration.lua +++ b/scripts/actions/mobskills/evisceration.lua @@ -1,8 +1,7 @@ ----------------------------------- -- Evisceration --- Delivers a fivefold attack --- Type: Physical --- Range: Melee +-- Family: Humanoid Dagger Weaponskill +-- Description: Delivers a fivefold attack ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 5 - local accmod = 1 - local ftp = 1 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 5 + params.fTP = { 1.0, 1.0, 1.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_5 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/eye_scratch.lua b/scripts/actions/mobskills/eye_scratch.lua index 7f326fa24bd..bf93b4e2076 100644 --- a/scripts/actions/mobskills/eye_scratch.lua +++ b/scripts/actions/mobskills/eye_scratch.lua @@ -1,11 +1,7 @@ ----------------------------------- --- Eye Scratch --- --- Description: Scratches a single target right in the eyes. Additional effect: Blind --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee --- Notes: +-- Eye Scratch +-- Family: Opo-opo +-- Description: Scratches a single target right in the eyes. Additional Effect: Blind ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,17 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BLINDNESS, 30, 0, 60) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BLINDNESS, 30, 0, 60) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/fang_rush.lua b/scripts/actions/mobskills/fang_rush.lua index 0fbf8d14093..c6bccec3502 100644 --- a/scripts/actions/mobskills/fang_rush.lua +++ b/scripts/actions/mobskills/fang_rush.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Fang Rush --- Description: Deals major damage with a threefold attack to a single target. --- Type: Physical --- Utsusemi/Blink absorb: 3 shadows --- Range: Melee +-- Fang Rush +-- Family: Wyvern +-- Description: Delivers a threefold attack that can critical strike. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,14 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 1 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/fast_blade.lua b/scripts/actions/mobskills/fast_blade.lua index a632a90e184..57822c88199 100644 --- a/scripts/actions/mobskills/fast_blade.lua +++ b/scripts/actions/mobskills/fast_blade.lua @@ -1,10 +1,7 @@ ----------------------------------- -- Fast Blade --- +-- Family: Humanoid Sword Weaponskill -- Description: Delivers a twofold attack. Damage varies with TP. --- Type: Physical --- Utsusemi/Blink absorb: Shadow per hit --- Range: Melee ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,14 +12,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 2 - local accmod = 1 - local ftp = 1.0 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 2 + params.fTP = { 1.0, 1.0, 1.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/fear_touch.lua b/scripts/actions/mobskills/fear_touch.lua index 377c76eb405..d7b34c81b6a 100644 --- a/scripts/actions/mobskills/fear_touch.lua +++ b/scripts/actions/mobskills/fear_touch.lua @@ -1,9 +1,7 @@ ----------------------------------- -- Fear Touch --- Description: Touches a single target. Additional Effect : Slow --- Type: Physical (Slashing) --- Utsusemi/Blink absorb: 1 Shadow --- Range: 7.0' +-- Family: Ghost +-- Description: Deals physical damage to a single target. Additional Effect : Slow ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,19 +10,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) return 0 end --- TODO: can crit mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.SLOW, 2500, 0, 300) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/feather_maelstrom.lua b/scripts/actions/mobskills/feather_maelstrom.lua index 4c20677fe5a..c663b2028e6 100644 --- a/scripts/actions/mobskills/feather_maelstrom.lua +++ b/scripts/actions/mobskills/feather_maelstrom.lua @@ -1,7 +1,7 @@ ----------------------------------- -- Feather Maelstrom --- Sends a storm of feathers to a single target. --- Additional effect: Bio & Amnesia +-- Family: Yagudo +-- Description: Deals physical damage to a single target. Additional Effect: Amnesia, Bio ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,17 +11,27 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 2 - local ftp = 2.8 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BIO, 6, 3, 60) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.AMNESIA, 1, 0, 60) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) + -- TODO: Physical or Ranged PDIF? + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.8, 2.8, 2.8 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + -- TODO: Capture power/duration of effects + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIO, 6, 3, 60, 0, 15) -- TODO: Capture subPower (ATTP Modifier). Using Bio II value for now (15%) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.AMNESIA, 1, 0, 60) -- Note: Power matters for things that attempt to remove Amnesia. + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/feather_storm.lua b/scripts/actions/mobskills/feather_storm.lua index 3eb4dc3c78b..ea056d3e2ee 100644 --- a/scripts/actions/mobskills/feather_storm.lua +++ b/scripts/actions/mobskills/feather_storm.lua @@ -10,19 +10,28 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) return 0 end --- TODO: damage scales with distance mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 2 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) + -- TODO: Physical or Ranged PDIF? + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.POISON, 3, 3, 45) + -- TODO: damage scales with distance. 1-3x from 1-10' - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.POISON, 3, 3, 45) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/fell_cleave.lua b/scripts/actions/mobskills/fell_cleave.lua index ca02ff0ef61..5de63d841c9 100644 --- a/scripts/actions/mobskills/fell_cleave.lua +++ b/scripts/actions/mobskills/fell_cleave.lua @@ -1,23 +1,34 @@ ----------------------------------- -- Fell Cleave +-- Family: Humanoid Great Axe Weaponskill +-- Description: ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - -- mob:messageBasic(xi.msg.basic.READIES_WS, 0, 41) + mob:messageBasic(xi.msg.basic.READIES_WS, 0, 91) + return 0 end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ACC_VARIES, 1, 2, 3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.75, 2.75, 2.75 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/feral_peck.lua b/scripts/actions/mobskills/feral_peck.lua index b410f0664ce..27e4a6d38f1 100644 --- a/scripts/actions/mobskills/feral_peck.lua +++ b/scripts/actions/mobskills/feral_peck.lua @@ -1,11 +1,8 @@ ----------------------------------- --- Feral Peck --- Mob Ability: 2429 --- Description: Deals a set amount of heavy damage (seems like ~90% of target's current HP) to a single target. --- Type: Physical --- Utsusemi/Blink absorb: Needs retail verification --- Range: Melee --- Notes: Used only by Zirnitra and Turul +-- Feral Peck +-- Family: Amphiptere +-- Description: Deals a set amount of heavy damage (seems like ~90% of target's current HP) to a single target. +-- Notes: Used by Zirnitra and Turul ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,23 +12,27 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local damage = target:getHP() - - -- If we have more than 30% HP, then reduce by 10% - if target:getHPP() > 30 then - damage = damage * 0.9 + local params = {} + + params.baseDamage = target:getHP() + params.numHits = 1 + params.fTP = { 0.90, 0.90, 0.90 } -- TODO: Capture % of current HP this does. + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS + params.skipFSTR = true + params.skipPDIF = true + params.skipParry = true -- TODO: Confirm this can't be parried, guarded or blocked. + params.skipGuard = true + params.skipBlock = true + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) end - local info = - { - damage = damage - } - - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, xi.mobskills.shadowBehavior.IGNORE_SHADOWS) - - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/fevered_pitch.lua b/scripts/actions/mobskills/fevered_pitch.lua index a1cdb7f3ab7..10028af69a3 100644 --- a/scripts/actions/mobskills/fevered_pitch.lua +++ b/scripts/actions/mobskills/fevered_pitch.lua @@ -1,29 +1,41 @@ ----------------------------------- --- Fevered Pitch --- Deals damage to a single target. Additional effect: Stun and Defense Down --- Utsusemi/Blink absorb: 1 shadow +-- Fevered Pitch +-- Family: Gnole +-- Description: Deals damage to a single target. Additional Effect: Defense Down, Stun +-- Notes: Only used in quadrupedal mode. ----------------------------------- ---@type TMobSkill local mobskillObject = {} --- TODO: should only use in 4 leg mode mobskillObject.onMobSkillCheck = function(target, mob, skill) + -- animsub 1 = standing, animsub 0 = all fours + if mob:getAnimationSub() == 1 then + return 1 + end + return 0 end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.DEFENSE_DOWN, 20, 0, 120) + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 4) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.DEFENSE_DOWN, 20, 0, 120) -- TODO: Capture duration + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) -- TODO: Capture stun duration + end - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/final_heaven.lua b/scripts/actions/mobskills/final_heaven.lua index a315ae1356c..8bbd51deaae 100644 --- a/scripts/actions/mobskills/final_heaven.lua +++ b/scripts/actions/mobskills/final_heaven.lua @@ -1,8 +1,7 @@ ----------------------------------- -- Final Heaven --- Description: Caestus/Spharai: Temporarily enhances Subtle Blow xi.effect. --- Type: Physical --- Range: Melee +-- Family: Humanoid Hand to Hand Weaponskill +-- Description: Caestus/Spharai: Temporarily enhances Subtle Blow effect ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,15 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.5 -- fTP and fTP scaling unknown. TODO: capture ftp + local params = {} - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.5, 2.5, 2.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.HTH + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 -- TODO: Capture shadowBehavior - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/final_retribution.lua b/scripts/actions/mobskills/final_retribution.lua index 172f860e72a..2e13e278631 100644 --- a/scripts/actions/mobskills/final_retribution.lua +++ b/scripts/actions/mobskills/final_retribution.lua @@ -1,11 +1,8 @@ ----------------------------------- --- Final Retribution --- Family: Corse --- Description: Damages enemies in an area of effect. Additional effect: Stun --- Type: Physical --- Utsusemi/Blink absorb: 1-3 shadows --- Range: Radial --- Notes: Only used by some notorious monsters like Xolotl. +-- Final Retribution +-- Family: Corse +-- Description: Damages enemies in an area of effect. Additional Effect: Stun +-- Notes: Only used by some notorious monsters like Xolotl. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,16 +12,27 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3.2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_3) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 4) + -- TODO: Jimmayus spreadsheet says this does fire damage but online sources say it can be absorbed by shadows. + -- We should probably recapture this skill before changing anything. - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.2, 3.2, 3.2 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) -- TODO: Capture stun duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/final_sting.lua b/scripts/actions/mobskills/final_sting.lua index da6d599ec27..b72ba06c803 100644 --- a/scripts/actions/mobskills/final_sting.lua +++ b/scripts/actions/mobskills/final_sting.lua @@ -1,41 +1,39 @@ ----------------------------------- --- Final Sting --- Description: Deals damage proportional to HP. Reduces HP to 1 after use. Damage varies with TP. --- Type: Physical (Slashing) +-- Final Sting +-- Family: Bee +-- Description: Deals unaspected damage proportional to mob's current HP. +-- Notes: Mob dies after use. ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - local param = skill:getParam() - if param == 0 then - param = 50 - end - - if mob:getHPP() <= param then + if mob:getHPP() <= 50 then return 0 end return 1 end --- TODO: this is totally wrong, see https://docs.google.com/spreadsheets/d/1YBoveP-weMdidrirY-vPDzHyxbEI2ryECINlfCnFkLI/ mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 + local params = {} + + params.baseDamage = skill:getMobHP() + params.fTP = { 0.5, 0.5, 0.5 } + params.element = xi.element.NONE + params.attackType = xi.attackType.MAGICAL + params.damageType = xi.damageType.NONE + params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS + params.skipDamageAdjustment = true + params.skipMagicBonusDiff = true - local hpMod = skill:getMobHPP() / 100 - ftp = ftp + hpMod * 14 + math.random(2, 6) + local info = xi.mobskills.mobMagicalMove(mob, target, skill, action, params) - if mob:isMobType(xi.mobType.NOTORIOUS) then - ftp = ftp * 5 + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) end - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + return info.damage end mobskillObject.onMobSkillFinalize = function(mob, skill) diff --git a/scripts/actions/mobskills/flailing_trunk.lua b/scripts/actions/mobskills/flailing_trunk.lua index 5fa5361f4c9..96be4f7d36a 100644 --- a/scripts/actions/mobskills/flailing_trunk.lua +++ b/scripts/actions/mobskills/flailing_trunk.lua @@ -1,7 +1,7 @@ ----------------------------------- --- Flailing Trunk --- Description: Smacks around frontward targets with its trunk. --- Utsusemi/Blink absorb: 2-3 shadows +-- Flailing Trunk +-- Family: Marid +-- Description: Deals conal AoE damage to targets in front of mob. Additional Effect: Knockback ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,17 +10,27 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) return 0 end --- TODO: hit count is suspicious/wrong mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - -- add knockback - - local numhits = 3 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + params.canCrit = true + params.criticalChance = { 0.50, 0.50, 0.50 } + + -- TODO: Capture knockback value + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/flaming_crush.lua b/scripts/actions/mobskills/flaming_crush.lua index 5ef772b7fee..177a4f601ac 100644 --- a/scripts/actions/mobskills/flaming_crush.lua +++ b/scripts/actions/mobskills/flaming_crush.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Flaming Crush --- Ifrit delivers a three-hit attack that deals fire elemental damage to target. +-- Family: Avatar (Ifrit) +-- Description: Ifrit delivers a three-hit attack. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 1.4 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 1, 2, 3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 1.4, 1.4, 1.4 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/flat_blade.lua b/scripts/actions/mobskills/flat_blade.lua index b0ea54a9c6b..d182bd465b7 100644 --- a/scripts/actions/mobskills/flat_blade.lua +++ b/scripts/actions/mobskills/flat_blade.lua @@ -1,10 +1,7 @@ ----------------------------------- -- Flat Blade --- +-- Family: Humanoid Sword Weaponskill -- Description: Stuns enemy. Chance of stunning varies with TP. --- Type: Physical --- Utsusemi/Blink absorb: Shadow per hit --- Range: Melee ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -18,23 +15,31 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - if mob:getPool() == xi.mobPool.QUBIA_ARENA_TRION then - target:showText(mob, zones[xi.zone.QUBIA_ARENA].text.FLAT_LAND) - end + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.25, 1.25, 1.25 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - local numhits = 1 - local accmod = 1 - local ftp = 1.25 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.CRIT_VARIES, 1.1, 1.2, 1.3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) - if math.random(1, 100) < skill:getTP() / 3 then - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 4) + -- TODO: Eventually, we will want to rework mobStatusEffectMove() to accept MACC modifiers based on TP instead of this. + if math.random(1, 100) < skill:getTP() / 3 then + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) -- TODO: Capture stun duration + end + end + + if mob:getPool() == xi.mobPool.QUBIA_ARENA_TRION then + target:showText(mob, zones[xi.zone.QUBIA_ARENA].text.FLAT_LAND) end - -- AA EV: Approx 900 damage to 75 DRG/35 THF. 400 to a NIN/WAR in Arhat, but took shadows. - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/fluid_spread.lua b/scripts/actions/mobskills/fluid_spread.lua index 9854f115b7c..a59c9c6fe5f 100644 --- a/scripts/actions/mobskills/fluid_spread.lua +++ b/scripts/actions/mobskills/fluid_spread.lua @@ -1,10 +1,8 @@ ----------------------------------- --- Fluid Spread --- --- Description: Splashes around liquid in an area of effect. --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows --- Range: 10' radial +-- Fluid Spread +-- Family: Slime +-- Description: Deals damage to targets in range of mob. +-- Note: This is a physical skill despite looking water based. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,13 +12,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = math.random(2, 3) - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ATK_VARIES, 1.5, 1.5, 1.5) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + params.attackMultiplier = { 1.5, 1.5, 1.5 } + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/fluid_toss.lua b/scripts/actions/mobskills/fluid_toss.lua index 690bd0acdb3..ffe589c6435 100644 --- a/scripts/actions/mobskills/fluid_toss.lua +++ b/scripts/actions/mobskills/fluid_toss.lua @@ -1,10 +1,7 @@ ----------------------------------- --- Fluid Toss --- --- Description: Lobs a ball of liquid at a single target. --- Type: Ranged --- Utsusemi/Blink absorb: 1 shadow --- Range: Unknown range +-- Fluid Toss +-- Family: Slime (Clot) +-- Description: Lobs a ball of liquid at a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,16 +10,27 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) return 0 end --- TODO: can crit mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ATK_VARIES, 2, 2, 2, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + -- TODO: Physical or Ranged PDIF? + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.attackMultiplier = { 2.0, 2.0, 2.0 } + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/fluid_toss_claret.lua b/scripts/actions/mobskills/fluid_toss_claret.lua index ff34c14d0d3..df6815bd797 100644 --- a/scripts/actions/mobskills/fluid_toss_claret.lua +++ b/scripts/actions/mobskills/fluid_toss_claret.lua @@ -1,10 +1,8 @@ ----------------------------------- --- Fluid Toss (Claret) --- Description: Lobs a ball of liquid at a single target. --- Type: Ranged --- Utsusemi/Blink absorb: 1 shadow --- Range: 15 --- Applies 100hp/tick poison if it hits. +-- Fluid Toss (Claret) +-- Family: Slime (Clot) +-- Description: Lobs a ball of liquid at a single target. +-- Notes: Applies 100hp/tick poison if it hits. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,20 +11,30 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) return 0 end --- TODO: can crit --- TODO: is claret different on ftp? mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 4.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + local params = {} - -- Apply poison if it hits - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.POISON, 100, 3, math.random(3, 6) * 3) -- 3-6 ticks + -- TODO: Physical or Ranged PDIF? + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.attackMultiplier = { 2.0, 2.0, 2.0 } + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + -- TODO: Capture effect duration + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.POISON, 100, 3, math.random(3, 6) * 3) -- 3-6 ticks + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/flurry_of_rage.lua b/scripts/actions/mobskills/flurry_of_rage.lua index 395c111b68e..1753038284b 100644 --- a/scripts/actions/mobskills/flurry_of_rage.lua +++ b/scripts/actions/mobskills/flurry_of_rage.lua @@ -1,7 +1,8 @@ ----------------------------------- -- Flurry of Rage --- Deals multiple hits to a single target. --- Only used by Eldritch Edge, Malefic Fencer, Gladiatorial Weapon and Nightmare Weapon. +-- Family: Evil Weapon +-- Description: Deals multiple hits to a single target. +-- Notes: Used by Eldritch Edge, Malefic Fencer, Gladiatorial Weapon and Nightmare Weapon. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,14 +12,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, 1, xi.mobskills.physicalTpBonus.ACC_VARIES, 2, 2.5, 3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 2 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 -- TODO: Capture shadowBehavior + -- TODO: Possible accuracy modifier - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/foot_kick.lua b/scripts/actions/mobskills/foot_kick.lua index d32bc2912c4..1b5f81ef5a8 100644 --- a/scripts/actions/mobskills/foot_kick.lua +++ b/scripts/actions/mobskills/foot_kick.lua @@ -1,7 +1,7 @@ ----------------------------------- -- Foot Kick --- Deals critical damage. Chance of critical hit varies with TP. --- 100% TP: ??? / 200% TP: ??? / 300% TP: ??? +-- Family: Rabbit +-- Description: Deals critical damage to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,14 +11,28 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = mob:getMainLvl() >= 50 and 2 or 1 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.canCrit = true + params.criticalChance = { 1.0, 1.0, 1.0 } + + if mob:getMainLvl() >= 50 then + params.fTP = { 2, 2, 2 } + end + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/forceful_blow.lua b/scripts/actions/mobskills/forceful_blow.lua index 8cc8d551ea7..8974b1b0c13 100644 --- a/scripts/actions/mobskills/forceful_blow.lua +++ b/scripts/actions/mobskills/forceful_blow.lua @@ -1,11 +1,8 @@ ----------------------------------- --- Forceful Blow --- --- Description: Delivers a powerful strike to a single target. --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee --- Notes: Only used by unarmed Mamool Ja of the warrior class (THF, NIN, BLU, BST, DRG). +-- Forceful Blow +-- Family: Mamool Ja +-- Description: Delivers a powerful strike to a single target. +-- Notes: Only used by unarmed Mamool Ja of the warrior class (THF, NIN, BLU, BST, DRG). ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -19,13 +16,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.DMG_VARIES, 1.0, 1.5, 2.0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.5, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/formation_attack.lua b/scripts/actions/mobskills/formation_attack.lua index 55ce2da7f72..fa607fb018b 100644 --- a/scripts/actions/mobskills/formation_attack.lua +++ b/scripts/actions/mobskills/formation_attack.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Formation Attack --- Description: Deals damage to a single target. --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Formation Attack +-- Family: Cluster +-- Description: Deals damage to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,18 +11,29 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) + local params = {} + + -- TODO: Recapture this skill. Determine if numHits varies with number of bombs in formation. + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 -- TODO: Capture shadowBehavior. + local animation = mob:getAnimationSub() - local ftp = 3 - local numhits = 1 - local accmod = 1 + if animation == 5 or animation == 13 then - ftp = 2 + params.fTP = { 2.0, 2.0, 2.0 } + end + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) end - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/foxfire.lua b/scripts/actions/mobskills/foxfire.lua index e53bdc7661f..bbc3bb4d85f 100644 --- a/scripts/actions/mobskills/foxfire.lua +++ b/scripts/actions/mobskills/foxfire.lua @@ -1,9 +1,8 @@ ----------------------------------- --- Foxfire --- --- Description: Damage varies with TP. Additional effect: "Stun." --- Type: Physical (Blunt) --- RDM, THF, PLD, BST, BRD, RNG, NIN, and COR fomors). +-- Foxfire +-- Family: Fomor +-- Description: Inflicts conal AoE damage to targets in front of mob. Additional Effect: Stun +-- Notes: Used by: RDM, THF, PLD, BST, BRD, RNG, NIN, and COR fomors (Generally 1 hand weapon types) ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -20,7 +19,7 @@ local validJobs = set{ } mobskillObject.onMobSkillCheck = function(target, mob, skill) - if validJobs[mob:getMainJob()] then + if validJobs[mob:getMainJob()] then -- TODO: Set Proper skill lists return 0 end @@ -28,16 +27,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 15) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 15) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/freeze_rush.lua b/scripts/actions/mobskills/freeze_rush.lua index a138b491ca9..879f8f37c62 100644 --- a/scripts/actions/mobskills/freeze_rush.lua +++ b/scripts/actions/mobskills/freeze_rush.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Freeze Rush --- Description: Makes an icy charge at a single target. --- Type: Magical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Freeze Rush +-- Family: Bomb (Snoll) +-- Description: Makes an icy charge at a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + -- TODO: Get captures for this skill to determine if physical or magical - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/frenetic_rip.lua b/scripts/actions/mobskills/frenetic_rip.lua index ca793420d10..faf6e671ab4 100644 --- a/scripts/actions/mobskills/frenetic_rip.lua +++ b/scripts/actions/mobskills/frenetic_rip.lua @@ -1,7 +1,7 @@ ----------------------------------- --- Frenetic Rip --- Description: Delivers a threefold attack. Damage varies with TP. --- Type: Physical (Blunt) +-- Frenetic Rip +-- Family: Imp +-- Description: Delivers a threefold attack. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,13 +15,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 1.334, 1.334, 1.334 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/frogkick.lua b/scripts/actions/mobskills/frogkick.lua index e2a2aea4b90..dd64de020a5 100644 --- a/scripts/actions/mobskills/frogkick.lua +++ b/scripts/actions/mobskills/frogkick.lua @@ -1,10 +1,7 @@ ----------------------------------- -- Frog Kick --- Deals damage to a single target. --- Type: Physical --- Can be dispelled: N/A --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Family: Funguar +-- Description: Deals damage to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,14 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1.5 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, 1, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/frypan.lua b/scripts/actions/mobskills/frypan.lua index 8ae27b5a6a4..b37028c5de1 100644 --- a/scripts/actions/mobskills/frypan.lua +++ b/scripts/actions/mobskills/frypan.lua @@ -1,7 +1,7 @@ ----------------------------------- --- Frypan --- Description: Damage varies with TP. Additional effect: "Stun." --- Type: Physical (Blunt) +-- Frypan +-- Family: Goblin +-- Description: Damage varies with TP. Additional Effect: Stun ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 4) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) -- TODO: Capture stun duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/full-force_blow.lua b/scripts/actions/mobskills/full-force_blow.lua index 8f4a036b9a6..5e7095844c7 100644 --- a/scripts/actions/mobskills/full-force_blow.lua +++ b/scripts/actions/mobskills/full-force_blow.lua @@ -1,7 +1,7 @@ ----------------------------------- -- Full-Force Blow --- Deals damage to a single target. Additional effect: Knockback. --- 0% TP: ??? / 150% TP: ??? / 300% TP: ??? +-- Family: Worm +-- Description: Deals damage to a single target. Additional Effect: Knockback ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,14 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - -- Add Knockback Animation - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ATK_VARIES, 1.5, 1.5, 1.5) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.attackMultiplier = { 1.5, 1.5, 1.5 } + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/fulminous_fury.lua b/scripts/actions/mobskills/fulminous_fury.lua index b84f040b610..03263fd2069 100644 --- a/scripts/actions/mobskills/fulminous_fury.lua +++ b/scripts/actions/mobskills/fulminous_fury.lua @@ -1,5 +1,6 @@ ----------------------------------- -- Fulminous Fury +-- Family: Humanoid (August) ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -28,10 +29,8 @@ mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) end xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, duration) - end - if info.damage > 0 then - mob:addTP(134) + -- mob:addTP(134) -- TODO: Is this set TP gain or linked to August's delay? end return info.damage diff --git a/scripts/actions/mobskills/gaea_stream_eta.lua b/scripts/actions/mobskills/gaea_stream_eta.lua index 4db3cefa69b..185f0df3660 100644 --- a/scripts/actions/mobskills/gaea_stream_eta.lua +++ b/scripts/actions/mobskills/gaea_stream_eta.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Gaea Stream: Eta --- Deals damage to a single target. +-- Family: Eald'narche +-- Description: Deals damage to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,13 +15,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.75 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_2) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.75, 1.75, 1.75 } -- TODO:Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/gaea_stream_lambda.lua b/scripts/actions/mobskills/gaea_stream_lambda.lua index 189be6f2001..550bd43f038 100644 --- a/scripts/actions/mobskills/gaea_stream_lambda.lua +++ b/scripts/actions/mobskills/gaea_stream_lambda.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Gaea Stream: Lambda --- Deals damage to a single target. +-- Family: Eald'narche +-- Description: Deals damage to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,13 +15,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.25 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_2) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.25, 2.25, 2.25 } -- TODO:Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/gaea_stream_theta.lua b/scripts/actions/mobskills/gaea_stream_theta.lua index c678046f4f1..c00057b695d 100644 --- a/scripts/actions/mobskills/gaea_stream_theta.lua +++ b/scripts/actions/mobskills/gaea_stream_theta.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Gaea Stream: Theta --- Deals damage to a single target. +-- Family: Eald'narche +-- Description: Deals damage to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,13 +15,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_2) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.00, 2.00, 2.00 } -- TODO:Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/gate_of_tartarus.lua b/scripts/actions/mobskills/gate_of_tartarus.lua index 44b13b5f4dc..1afc9aa408e 100644 --- a/scripts/actions/mobskills/gate_of_tartarus.lua +++ b/scripts/actions/mobskills/gate_of_tartarus.lua @@ -1,10 +1,7 @@ ----------------------------------- --- Gate of Tartarus --- --- Description: Lowers target's attack. Claustrum/Thyrus: Refresh --- Type: Physical --- Shadow per hit --- Range: Melee +-- Gate of Tartarus +-- Family: Humanoid Staff Weaponskill +-- Description: Lowers target's attack. Claustrum/Thyrus: Refresh ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,20 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.5 -- fTP and fTP scaling unknown. TODO: capture ftp + local params = {} - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.5, 2.5, 2.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - local duration = 60 - local power = 20 + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.ATTACK_DOWN, power, 0, duration) + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.ATTACK_DOWN, 20, 0, 60) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/geirskogul.lua b/scripts/actions/mobskills/geirskogul.lua index 6ff80534e8c..235d3f2a48f 100644 --- a/scripts/actions/mobskills/geirskogul.lua +++ b/scripts/actions/mobskills/geirskogul.lua @@ -1,8 +1,7 @@ ----------------------------------- --- Geirskogul --- Description: Gae Assail/Gungnir: Shock Spikes. --- Type: Physical --- Range: Melee +-- Geirskogul +-- Family: Humanoid Polearm Weaponskill +-- Description: Gae Assail/Gungnir: Shock Spikes. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,15 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.5 -- fTP and fTP scaling unknown. TODO: capture ftp + local params = {} - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.5, 2.5, 2.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/giga_scream.lua b/scripts/actions/mobskills/giga_scream.lua index 05311e9424a..d32b0edeb47 100644 --- a/scripts/actions/mobskills/giga_scream.lua +++ b/scripts/actions/mobskills/giga_scream.lua @@ -1,11 +1,7 @@ ----------------------------------- -- Giga Scream --- +-- Family: Roc -- Description: Delivers a threefold attack on a single target. --- Type: Physical --- Can be dispelled: N/A --- Utsusemi/Blink absorb: 3 shadows --- Range: Melee ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,14 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1.5 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/giga_slash.lua b/scripts/actions/mobskills/giga_slash.lua index 5f3c1f83791..e5dae85af84 100644 --- a/scripts/actions/mobskills/giga_slash.lua +++ b/scripts/actions/mobskills/giga_slash.lua @@ -1,7 +1,7 @@ ----------------------------------- -- Giga Slash --- Deals critical damage. Chance of critical hit varies with TP. --- 100% TP: ??? / 200% TP: ??? / 300% TP: ??? +-- Family: Shadow Lord +-- Description: Deals critical damage. Chance of critical hit varies with TP. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,14 +15,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.7 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.7, 2.7, 2.7 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 -- TODO: Capture shadowBehavior + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/glacier_splitter.lua b/scripts/actions/mobskills/glacier_splitter.lua index 5ed7b777875..ba19d683e06 100644 --- a/scripts/actions/mobskills/glacier_splitter.lua +++ b/scripts/actions/mobskills/glacier_splitter.lua @@ -1,11 +1,8 @@ ----------------------------------- --- Glacier Splitter --- --- Description: Cleaves into targets in a fan-shaped area. Additional effect: Paralyze --- Type: Physical --- Utsusemi/Blink absorb: 1-3 shadows --- Range: Unknown cone --- Notes: Only used the Aern wielding a sword (RDM, DRK, and PLD). +-- Glacier Splitter +-- Family: Aern +-- Description: Cleaves into targets in a fan-shaped area. Additional Effect: Paralyze +-- Notes: Used the Aern wielding a sword (RDM, DRK, and PLD). ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,16 +12,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = math.random(1, 3) - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.PARALYSIS, 15, 0, math.random(30, 60)) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Recapture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + -- TODO: This might be a conal AoE skill. Need captures. - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PARALYSIS, 15, 0, math.random(30, 60)) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/gnash.lua b/scripts/actions/mobskills/gnash.lua index 0bf6a646c48..03814f4afa5 100644 --- a/scripts/actions/mobskills/gnash.lua +++ b/scripts/actions/mobskills/gnash.lua @@ -1,7 +1,7 @@ ----------------------------------- -- Gnash +-- Family: Orobon -- Description: Chews on a single target, reducing HP to one half. --- Type: Physical -- Notes: Retail testing shows this is more like 45% to 55% of the targets current HP ----------------------------------- ---@type TMobSkill @@ -12,17 +12,33 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local damage = math.floor(target:getHP() * (math.random(45, 55) / 100)) - local info = - { - damage = damage - } + local params = {} - damage = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, xi.mobskills.shadowBehavior.IGNORE_SHADOWS) - target:takeDamage(damage, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - mob:resetEnmity(target) + local fTP = (math.random(45, 55) / 100) -- TODO: Is it random or does something influence it? - return damage + params.baseDamage = target:getHP() + params.numHits = 1 + params.fTP = { fTP, fTP, fTP } -- TODO: Capture % of current HP this does. + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS + params.skipFSTR = true + params.skipPDIF = true + params.skipParry = true -- TODO: Confirm this can't be parried, guarded or blocked. + params.skipGuard = true + params.skipBlock = true + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + -- TODO: Capture hate reset type (Enmity wipe vs enmity turned off) + -- See Antica skill "Sand Trap" for reference + mob:resetEnmity(target) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/goblin_rush.lua b/scripts/actions/mobskills/goblin_rush.lua index b119f1e404a..3a45790be2d 100644 --- a/scripts/actions/mobskills/goblin_rush.lua +++ b/scripts/actions/mobskills/goblin_rush.lua @@ -1,7 +1,7 @@ ----------------------------------- -- Goblin Rush +-- Family: Goblin -- Delivers a threefold attack. Accuracy varies with TP. --- 100% TP: ??? / 250% TP: ??? / 300% TP: ??? ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,14 +11,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ACC_VARIES, 1, 2, 3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + local params = {} - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 + -- TODO: Possible accuracy modifier + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/gouging_branch.lua b/scripts/actions/mobskills/gouging_branch.lua index 175e1524c21..5495a575ef5 100644 --- a/scripts/actions/mobskills/gouging_branch.lua +++ b/scripts/actions/mobskills/gouging_branch.lua @@ -1,10 +1,8 @@ ----------------------------------- --- Gouging Branch --- Description: Drills a single target with a branch. Additional effect: Blind --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows --- Range: Melee --- Notes: Only used by Stcemqestcint +-- Gouging Branch +-- Family: Treant +-- Description: Deals conal AoE physical damage to targets in front of mob. +-- Notes: Used by Stcemqestcint as its auto attack. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,16 +12,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, 1, xi.mobskills.physicalTpBonus.NO_EFFECT, 2.0, 2.0, 2.0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BLINDNESS, 50, 0, 45) + -- https://discord.com/channels/443544205206355968/788637367652319242/1171657084903886869 + -- Capture shows conal AoE. No status effects applied. Damage varies greatly, likely a multi hit. - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 -- TODO: Capture numHits + params.fTP = { 1.0, 1.0, 1.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + -- TODO: Possible accuracy modifier - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/grand_slam.lua b/scripts/actions/mobskills/grand_slam.lua index 75882654687..09acc898602 100644 --- a/scripts/actions/mobskills/grand_slam.lua +++ b/scripts/actions/mobskills/grand_slam.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Grand Slam --- Deals physical damage in an area around the user. +-- Family: Gigas +-- Description: Deals physical damage in an area around the mob. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,15 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.0 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, xi.mobskills.shadowBehavior.NUMSHADOWS_3) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/grapeshot.lua b/scripts/actions/mobskills/grapeshot.lua index 77160eaee62..237e8f742fd 100755 --- a/scripts/actions/mobskills/grapeshot.lua +++ b/scripts/actions/mobskills/grapeshot.lua @@ -1,7 +1,7 @@ ----------------------------------- --- Grape Shot (Lion) --- Conal damage and stun effect. --- Type: Physical +-- Grape Shot +-- Family: Humanoid (Lion) +-- Description: Conal physical damage. Additional Effect: Stun -- Skillchain Properties: Reverberation/Transfixion ----------------------------------- ---@type TMobSkill @@ -12,17 +12,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 0.3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, mob:getWeaponDmg() * ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 10) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 0.3, 0.3, 0.3 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 -- TODO: Capture shadowBehavior - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 10) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/grapple.lua b/scripts/actions/mobskills/grapple.lua index 25c4a6ffb7e..8734ba161c2 100644 --- a/scripts/actions/mobskills/grapple.lua +++ b/scripts/actions/mobskills/grapple.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Grapple --- Deals physical damage to enemies within a fan-shaped area originating from pet. +-- Family: Diremite +-- Description: Deals physical damage to enemies within a fan-shaped area originating from pet. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = math.random(2, 2.5) - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_4 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/grating_tantara.lua b/scripts/actions/mobskills/grating_tantara.lua index e478007184e..7c81dfbdda6 100644 --- a/scripts/actions/mobskills/grating_tantara.lua +++ b/scripts/actions/mobskills/grating_tantara.lua @@ -1,8 +1,7 @@ ----------------------------------- -- Grating Tantara --- --- Description: Inflicts amnesia in an area of effect and deals damage. --- Type: Enfeebling +-- Family: Imp +-- Description: Deals damage to targets in range. Additional Effect: Amnesia -- Utsusemi/Blink absorb: Strips shadows -- Range: 10' as well as single target outside of 10' -- Notes: Doesn't use this if its horn is broken. Used only by certain Imp NMs, in place of Abrasive Tantara. @@ -11,7 +10,10 @@ local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - if mob:getAnimationSub() == 5 and mob:getFamily() == 165 then -- Imps without horn + if + mob:getAnimationSub() == 5 and + mob:getFamily() == 165 + then -- Imps without horn return 1 else return 0 @@ -19,16 +21,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3.0 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.MAGICAL, xi.damageType.ELEMENTAL, xi.mobskills.shadowBehavior.WIPE_SHADOWS) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.AMNESIA, 1, 0, 60) + -- TODO: Capture if magical or physical + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.WIPE_SHADOWS -- TODO: Capture shadowBehavior - target:takeDamage(dmg, mob, xi.attackType.MAGICAL, xi.damageType.ELEMENTAL) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.AMNESIA, 1, 0, 60) -- TODO: Capture power/duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/gravitic_horn.lua b/scripts/actions/mobskills/gravitic_horn.lua index b03be654e0e..c1e96b2254a 100644 --- a/scripts/actions/mobskills/gravitic_horn.lua +++ b/scripts/actions/mobskills/gravitic_horn.lua @@ -1,13 +1,9 @@ ----------------------------------- -- Gravitic Horn --- Family: Antlion (Only used by Formiceros subspecies) +-- Family: Antlion (Used by Formiceros subspecies) -- Description: Heavy wind, Throat Stab-like damage in a fan-shaped area of effect. Resets enmity. --- Type: Magical --- Can be dispelled: N/A --- Utsusemi/Blink absorb: Ignores shadows --- Range: Conal AoE -- Notes: If Orcus uses this, it gains an aura which inflicts Weight & Defense Down to targets in range. --- Shell lowers the damage of this, and items like Jelly Ring can get you killed. +-- Shell lowers the damage of this, and items like Jelly Ring can get you killed. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -17,23 +13,27 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local damage = target:getHP() + local params = {} - -- estimation based on "Throat Stab-like damage" - if damage / target:getMaxHP() > 0.2 then - damage = math.floor(damage * 0.95) - end + params.baseDamage = target:getHP() + params.fTP = { 0.95, 0.95, 0.95 } -- TODO: Capture HP threshhold + params.element = xi.element.WIND + params.attackType = xi.attackType.MAGICAL + params.damageType = xi.damageType.WIND + params.shadowBehavior = xi.mobskills.shadowBehavior.WIPE_SHADOWS + + -- https://wiki.ffo.jp/html/24615.html + -- TODO: There are unique mechanics on this skill. Need captures. + -- Damage is sometimes throat stab style(current HP) and sometimes a normal elemental skill? + -- May have distance or conal damage adjustment. - local info = - { - damage = math.floor(damage * xi.combat.damage.magicalElementSDT(target, xi.element.WIND)) - } - damage = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.MAGICAL, xi.damageType.WIND, xi.mobskills.shadowBehavior.WIPE_SHADOWS) + local info = xi.mobskills.mobMagicalMove(mob, target, skill, action, params) - target:takeDamage(damage, mob, xi.attackType.MAGICAL, xi.damageType.WIND) - mob:resetEnmity(target) + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end - return damage + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/gravity_wheel.lua b/scripts/actions/mobskills/gravity_wheel.lua index 2359b6c5b9e..ae460bd5a0c 100644 --- a/scripts/actions/mobskills/gravity_wheel.lua +++ b/scripts/actions/mobskills/gravity_wheel.lua @@ -1,16 +1,13 @@ ----------------------------------- --- Gravity Wheel --- --- Description: Deals heavy damage to players in an area of effect. Additional effect: Weight --- Type: Physical --- 2-3 Shadows --- Range: Unknown +-- Gravity Wheel +-- Family: Mammet +-- Description: Deals damage to targets in an area of effect. Additional Effect: Weight ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - if mob:getAnimationSub() == 2 then + if mob:getAnimationSub() == 2 then -- Used in polearm form return 0 end @@ -18,15 +15,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_2) - - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.WEIGHT, 50, 0, 120) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.WEIGHT, 50, 0, 120) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/great_wheel.lua b/scripts/actions/mobskills/great_wheel.lua index 703dea30470..8a0859d3f95 100644 --- a/scripts/actions/mobskills/great_wheel.lua +++ b/scripts/actions/mobskills/great_wheel.lua @@ -1,10 +1,8 @@ ----------------------------------- --- Great Wheel --- --- Description: Damages enemies in an area of effect. Additional effect: Enmity Reset --- Type: Physical --- Wipes Shadows --- Range: Melee range radial +-- Great Wheel +-- Family: Humanoid (Kam'lanaught / Trust: Mildaurion) +-- Description: Damages enemies in an area of effect. Additional Effect: Enmity Reset +-- Note: Skill used by "Trust: Mildaurion" also inflicts knockback. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,19 +12,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_3) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - if not target:isTrust() then - mob:resetEnmity(target) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + if not target:isTrust() then + mob:resetEnmity(target) + end end - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/grim_halo.lua b/scripts/actions/mobskills/grim_halo.lua index 008bdce1795..ed782693b0a 100644 --- a/scripts/actions/mobskills/grim_halo.lua +++ b/scripts/actions/mobskills/grim_halo.lua @@ -1,12 +1,14 @@ ----------------------------------- -- Grim Halo --- Deals damage to a all targets. Additional effect: Knockback --- Only used by Fomors that wield a two-handed weapon (principally WAR, BLM, DRK, SAM, DRG, and SMN fomors). +-- Family: Fomor +-- Description: Deals damage to a all targets in range. Additional Effect: Knockback +-- Notes: Used by Fomors that wield a two-handed weapon (principally WAR, BLM, DRK, SAM, DRG, and SMN fomors). ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) + -- TODO: Set proper skilllists local job = mob:getMainJob() if job == xi.job.WAR or @@ -23,14 +25,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.5 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.5, 2.5, 2.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/grim_reaper.lua b/scripts/actions/mobskills/grim_reaper.lua index 1e3f7aa67c3..daeb93596e2 100644 --- a/scripts/actions/mobskills/grim_reaper.lua +++ b/scripts/actions/mobskills/grim_reaper.lua @@ -1,11 +1,8 @@ ----------------------------------- --- Grim Reaper --- --- Description: Deals damage in a threefold attack to targets in a fan-shaped area of effect. Additional effect: Doom --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows --- Range: Unknown cone --- Notes: Used only by certain Lamia NMs (e.g. Lamia No.3). If they lost their staff, they'll use Hysteric Barrage instead. +-- Grim Reaper +-- Family: Lamia +-- Description: Deals damage in a threefold attack to targets in a fan-shaped area of effect. Additional Effect: Doom +-- Notes: Used only by certain Lamia NMs (e.g. Lamia No.3). If they lost their staff, they'll use Hysteric Barrage instead. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -19,14 +16,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 1.2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 -- TODO: Capture numHits + params.fTP = { 1.2, 1.2, 1.2 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, skill, xi.effect.DOOM, 10, 3, 45) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/ground_strike.lua b/scripts/actions/mobskills/ground_strike.lua index b5d357d0dfc..086a7bc5574 100644 --- a/scripts/actions/mobskills/ground_strike.lua +++ b/scripts/actions/mobskills/ground_strike.lua @@ -1,5 +1,7 @@ ----------------------------------- -- Ground Strike +-- Family: Humanoid Great Sword Weaponskill +-- Description: Delivers a single target attack. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -9,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 4 - local ftp = 3.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.5, 3.5, 3.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/groundburst.lua b/scripts/actions/mobskills/groundburst.lua index e21a5595301..b94417f7607 100644 --- a/scripts/actions/mobskills/groundburst.lua +++ b/scripts/actions/mobskills/groundburst.lua @@ -1,11 +1,7 @@ ----------------------------------- --- Groundburst --- --- Description: Expels a fireball on targets in an area of effect. --- Type: Physical --- Utsusemi/Blink absorb: Wipes shadows --- Range: Unknown radial --- Notes: Only used by notorious monsters, and from any Mamool Ja in besieged. +-- Groundburst +-- Family: Mamool Ja +-- Description: Expels a fireball on targets in an area of effect. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,13 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, xi.mobskills.shadowBehavior.WIPE_SHADOWS) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + -- TODO: Capture if magical or physical + -- No data on this skill. + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.WIPE_SHADOWS + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/guided_missile.lua b/scripts/actions/mobskills/guided_missile.lua index e481794ebe3..e991e59ebd9 100644 --- a/scripts/actions/mobskills/guided_missile.lua +++ b/scripts/actions/mobskills/guided_missile.lua @@ -1,10 +1,7 @@ ----------------------------------- --- Guided_Missile --- --- Description: Targeted 10'(?) AoE ~400-750 physical damage, absorbed by Utsusemi --- Type: Physical --- Wipes Shadows --- Range: 5 yalms +-- Guided Missile +-- Family: Omega +-- Description: Deals AoE physical damage to targets in range. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,13 +11,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 0.8 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 -- TODO: Confirm numJits + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + -- TODO: Possible accuracy modifier + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/guided_missile_ii.lua b/scripts/actions/mobskills/guided_missile_ii.lua index 69330a536e2..759cf7ac5d1 100644 --- a/scripts/actions/mobskills/guided_missile_ii.lua +++ b/scripts/actions/mobskills/guided_missile_ii.lua @@ -2,6 +2,7 @@ -- Guided Missile II -- Family: Omega -- Notes: Similar to Guided Missile but used during standing form. Ignores Shadows. +-- Notes: Used in standing form. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -17,15 +18,15 @@ end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) local params = {} - -- TODO: This is a physical skill, will fix in mobPhysicalMove() PR. - params.baseDamage = mob:getMainLvl() + 2 - params.fTP = { 3, 3, 3 } -- TODO: Capture fTPs - params.element = xi.element.DARK - params.attackType = xi.attackType.MAGICAL - params.damageType = xi.damageType.DARK + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 -- TODO: Confirm numJits + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS + -- TODO: Possible accuracy modifier - local info = xi.mobskills.mobMagicalMove(mob, target, skill, action, params) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) if xi.mobskills.processDamage(mob, target, skill, action, info) then target:takeDamage(info.damage, mob, info.attackType, info.damageType) diff --git a/scripts/actions/mobskills/guillotine.lua b/scripts/actions/mobskills/guillotine.lua index f30b9d689c6..07c9781d38e 100644 --- a/scripts/actions/mobskills/guillotine.lua +++ b/scripts/actions/mobskills/guillotine.lua @@ -1,10 +1,7 @@ ----------------------------------- --- Guillotine --- --- Description: Delivers a four-hit attack. Silences enemy. Duration of effect varies with TP. --- Type: Physical --- Number of hits --- Range: Melee +-- Guillotine +-- Family: Humanoid Scythe Weaponskill +-- Description: Delivers a four-hit attack. Additional Effect: Silence ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,17 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 4 - local accmod = 1 - local ftp = 0.8 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 4 + params.fTP = { 0.8, 0.8, 0.8 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_4 - xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.SILENCE, 1, 0, (skill:getTP() * 30 / 1000) + 30) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.SILENCE, 1, 0, (skill:getTP() * 30 / 1000) + 30) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/gust_slash.lua b/scripts/actions/mobskills/gust_slash.lua index 3c4e7d94cd0..9b314e976fc 100644 --- a/scripts/actions/mobskills/gust_slash.lua +++ b/scripts/actions/mobskills/gust_slash.lua @@ -5,19 +5,28 @@ local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - -- mob:messageBasic(xi.msg.basic.READIES_WS, 0, 41) + mob:messageBasic(xi.msg.basic.READIES_WS, 0, 19) + return 0 end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ACC_VARIES, 1, 2, 3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} + -- TODO: Likely a magical skill + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/gusting_gouge.lua b/scripts/actions/mobskills/gusting_gouge.lua index 499814443db..f2e65e679f3 100644 --- a/scripts/actions/mobskills/gusting_gouge.lua +++ b/scripts/actions/mobskills/gusting_gouge.lua @@ -1,9 +1,8 @@ ----------------------------------- --- Gusting Gouge --- Description: Deals Wind damage in a threefold attack to targets in a fan-shaped area of effect. --- Type: Physical? --- Utsusemi/Blink absorb: 3 shadows --- Notes: Used only by Lamia equipped with a one-handed weapon. If they lost their weapon, they'll use Hysteric Barrage instead. +-- Gusting Gouge +-- Family: Lamia +-- Description: Deals physical damage in a threefold attack to targets in a fan-shaped area of effect. +-- Notes: Used by Lamia equipped with a one-handed weapon(Dagger). If they lost their weapon, they'll use Hysteric Barrage instead. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,7 +11,7 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) if mob:getAnimationSub() ~= 1 and ( - mob:getMainJob() == xi.job.COR or + mob:getMainJob() == xi.job.COR or -- TODO: Set proper skill lists mob:getMainJob() == xi.job.BRD or mob:getMainJob() == xi.job.RDM ) @@ -24,13 +23,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 -- TODO: Confirm numHits + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING -- TODO: Capture damageType + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/hammer-go-round.lua b/scripts/actions/mobskills/hammer-go-round.lua index e526a227bc8..63683f553be 100644 --- a/scripts/actions/mobskills/hammer-go-round.lua +++ b/scripts/actions/mobskills/hammer-go-round.lua @@ -1,11 +1,8 @@ ----------------------------------- -- Hammer-Go-Round --- --- Description: Damages nearby targets with a hammer carousel. Additional effect: Knockback --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadow --- Range: Melee --- Notes: Only used by "destroyers" (carrying massive warhammers). +-- Family: Troll +-- Description: Damages nearby targets with a hammer carousel. Additional Effect: Knockback +-- Notes: Only used by troll "destroyers" (carrying massive warhammers). ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,13 +12,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = math.random(2, 3) - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.5, 2.5, 2.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/hammer_beak.lua b/scripts/actions/mobskills/hammer_beak.lua index bf0c56ecc4d..5c62f0fb01b 100644 --- a/scripts/actions/mobskills/hammer_beak.lua +++ b/scripts/actions/mobskills/hammer_beak.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Hammer Beak --- Description: Deals heavy damage to a single target. --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Hammer Beak +-- Family: Cockatrice +-- Description: Deals heavy damage to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,14 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3.0 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/hammerblow.lua b/scripts/actions/mobskills/hammerblow.lua index e0fa5db3471..02634d4577e 100644 --- a/scripts/actions/mobskills/hammerblow.lua +++ b/scripts/actions/mobskills/hammerblow.lua @@ -1,11 +1,8 @@ ----------------------------------- --- Hammerblow --- --- Description: Swings the hammer right at a single target. --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee --- Notes: Only used by "destroyers" (carrying massive warhammers). +-- Hammerblow +-- Family: Troll +-- Description: Swings the hammer right at a single target. +-- Notes: Only used by troll "destroyers" (carrying massive warhammers). ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,13 +12,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.8 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.8, 2.8, 2.8 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/hane_fubuki.lua b/scripts/actions/mobskills/hane_fubuki.lua index b1634bf0193..bc7bb2c71d8 100644 --- a/scripts/actions/mobskills/hane_fubuki.lua +++ b/scripts/actions/mobskills/hane_fubuki.lua @@ -1,7 +1,8 @@ ----------------------------------- -- Hane Fubuki --- Description: Additional effect: Poison. Chance of effect varies with TP. --- Type: Physical (Piercing) +-- Family: Yagudo +-- Description: Deals physical damage to a target. Additional Effect: Poison +-- Notes: Similar to "Feather Storm" skill ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,16 +12,27 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 2 - local ftp = 3 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.POISON, mob:getMainLvl() / 7, 3, 120) + -- TODO: Physical or Ranged? + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + -- TODO: "Feather Storm" scales with distance. Check if this does as well. - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + -- TODO: Capture effect power/duration + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.POISON, mob:getMainLvl() / 7, 3, 120) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/happobarai.lua b/scripts/actions/mobskills/happobarai.lua index 30e4438eeb5..f59ed198993 100644 --- a/scripts/actions/mobskills/happobarai.lua +++ b/scripts/actions/mobskills/happobarai.lua @@ -1,9 +1,8 @@ ----------------------------------- -- Happobarai --- Description: Damages enemies in an area of effect. Additional effect: Stun --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows --- Range: 10' radial +-- Family: Yagudo +-- Description: Damages enemies in an area of effect. Additional Effect: Stun +-- Notes: Similar to Yagudo skill "Sweep". ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,16 +12,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_3) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 4) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.2, 2.2, 2.2 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) -- TODO: Capture stun duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/hard_slash.lua b/scripts/actions/mobskills/hard_slash.lua index 50895185ef2..b85c8189a25 100644 --- a/scripts/actions/mobskills/hard_slash.lua +++ b/scripts/actions/mobskills/hard_slash.lua @@ -1,10 +1,7 @@ ----------------------------------- --- Hard Slash --- --- Description: Delivers a single-hit attack. --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Hard Slash +-- Family: Humanoid Great Sword Weaponskill +-- Description: Delivers a single-hit attack. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/havoc_spiral.lua b/scripts/actions/mobskills/havoc_spiral.lua index 670cadf46dd..5d9676ab269 100644 --- a/scripts/actions/mobskills/havoc_spiral.lua +++ b/scripts/actions/mobskills/havoc_spiral.lua @@ -1,10 +1,8 @@ ----------------------------------- --- Havoc Spiral --- Description: Deals damage to players in an area of effect. Additional effect: Sleep --- Type: Physical --- 2-3 Shadows --- Range: Unknown --- Special weaponskill unique to Ark Angel MR. Deals ~100-300 damage. +-- Havoc Spiral +-- Family: Humanoid (Ark Angel MR) +-- Description: Deals damage to players in an area of effect. Additional Effect: Sleep +-- Notes: Special weaponskill unique to Ark Angel MR. Deals ~100-300 damage. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,18 +12,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - -- TODO: Can skillchain? Unknown property. - - local numhits = 1 - local accmod = 1 - local ftp = 3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_2) - - -- Witnessed 280 to a melee, 400 to a BRD, and 500 to a wyvern - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.SLEEP_I, 1, 0, math.random(30, 60)) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 -- TODO: Capture shadowBehavior + -- TODO: Can skillchain? Unknown property + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.SLEEP_I, 1, 0, math.random(30, 60)) -- TODO: Capture effect power/duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/haymaker.lua b/scripts/actions/mobskills/haymaker.lua index 2241ed38362..ddf8902aac9 100644 --- a/scripts/actions/mobskills/haymaker.lua +++ b/scripts/actions/mobskills/haymaker.lua @@ -1,10 +1,8 @@ ----------------------------------- --- Haymaker --- Description: Punches the daylights out of all targets in front. Additional effect: Amnesia --- Type: Physical --- Utsusemi/Blink absorb: Unknown --- Range: Front cone --- Notes: Only used by Gurfurlur the Menacing. +-- Haymaker +-- Family: Troll +-- Description: Punches the daylights out of all targets in front. Additional Effect: Amnesia +-- Notes: Used by Gurfurlur the Menacing. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,16 +12,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.HTH, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.AMNESIA, 1, 0, 60) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.HTH + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.HTH) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.AMNESIA, 1, 0, 60) -- TODO: Capture effect power/duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/head_butt.lua b/scripts/actions/mobskills/head_butt.lua index 0ab12261fca..e1896c2012e 100644 --- a/scripts/actions/mobskills/head_butt.lua +++ b/scripts/actions/mobskills/head_butt.lua @@ -1,7 +1,7 @@ ----------------------------------- --- Head Butt --- Description: Deals blunt damage to a single target. --- Type: Physical (Blunt) +-- Head Butt (Mandragora) +-- Family: Mandragora +-- Description: Deals blunt damage to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,14 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/head_butt_quadav.lua b/scripts/actions/mobskills/head_butt_quadav.lua index 230d9a9e421..c16833b7fce 100644 --- a/scripts/actions/mobskills/head_butt_quadav.lua +++ b/scripts/actions/mobskills/head_butt_quadav.lua @@ -1,7 +1,7 @@ ----------------------------------- --- Head Butt --- Description: Damage varies with TP. Additional effect: "Stun." --- Type: Physical (Blunt) +-- Head Butt +-- Family: Quadav +-- Description: Deals physical damage to a target. Additional Effect: Stun ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,17 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 4) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) -- TODO: Capture stun duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/head_butt_turtle.lua b/scripts/actions/mobskills/head_butt_turtle.lua index a79075c64a4..45c8fd2d8b1 100644 --- a/scripts/actions/mobskills/head_butt_turtle.lua +++ b/scripts/actions/mobskills/head_butt_turtle.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Head Butt (Adamantoise) --- Deals damage to single target. Additional effects: Accuracy Down and large knockback +-- Family: Adamantoise +-- Description: Deals damage to single target. Additional Effect: Accuracy Down, Knockback ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,17 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - local duration = math.random(120, 180) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.ACCURACY_DOWN, 40, 0, duration) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.ACCURACY_DOWN, 40, 0, math.random(120, 180)) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/heavy_blow.lua b/scripts/actions/mobskills/heavy_blow.lua index bfc2999d725..a92ef5a06d1 100644 --- a/scripts/actions/mobskills/heavy_blow.lua +++ b/scripts/actions/mobskills/heavy_blow.lua @@ -1,7 +1,7 @@ ----------------------------------- --- Heavy Blow --- Description: Single target damage --- Type: Physical (Blunt) +-- Heavy Blow +-- Family: Bugbear +-- Description: Single target damage. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,14 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, nil, nil, nil, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.HTH, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.HTH) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.HTH + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/heavy_stomp.lua b/scripts/actions/mobskills/heavy_stomp.lua index 2eafa21d65c..eec340a2d2a 100644 --- a/scripts/actions/mobskills/heavy_stomp.lua +++ b/scripts/actions/mobskills/heavy_stomp.lua @@ -1,11 +1,7 @@ ----------------------------------- --- Heavy Stomp --- --- Description: Deals heavy damage to targets within an area of effect. Additional effect: Paralysis --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows --- Range: Unknown radial --- Notes: Paralysis effect has a very long duration. +-- Heavy Stomp +-- Family: Dragon +-- Description: Deals heavy damage to targets within an area of effect. Additional Effect: Paralysis ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,17 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.PARALYSIS, 15, 0, 960) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PARALYSIS, 15, 0, 960) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/heavy_strike.lua b/scripts/actions/mobskills/heavy_strike.lua index 7d2773e3207..92b943c37ec 100644 --- a/scripts/actions/mobskills/heavy_strike.lua +++ b/scripts/actions/mobskills/heavy_strike.lua @@ -1,7 +1,7 @@ ----------------------------------- -- Heavy Strike --- Damage varies with TP. --- 0% TP: 2.25 / 150% TP: 3.50 / 300% TP: 4.75 +-- Family: Golem +-- Description: Damage varies with TP. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,16 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.SLOW, 1250, 0, 120) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.5, 2.5, 2.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/heavy_strike_ulli.lua b/scripts/actions/mobskills/heavy_strike_ulli.lua index a0a1f76d2cb..72b18d01a53 100644 --- a/scripts/actions/mobskills/heavy_strike_ulli.lua +++ b/scripts/actions/mobskills/heavy_strike_ulli.lua @@ -1,7 +1,7 @@ ----------------------------------- -- Heavy Strike (Ullikummi) --- Damage varies with TP. Resets enmity if damage is dealt. Always knocks back players even if it misses. --- 0% TP: 2.25 / 150% TP: 3.50 / 300% TP: 4.75 +-- Family: Golem +-- Description: Damage varies with TP. Resets enmity if damage is dealt. Always knocks back players even if it misses. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,19 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + -- TODO: Knockback always applies even if missed/evaded. (May need adjustments to logic in core) + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) - if dmg > 0 then mob:resetEnmity(target) end - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/hell_slash.lua b/scripts/actions/mobskills/hell_slash.lua index 2ddcdd2da71..d8a1078dec1 100644 --- a/scripts/actions/mobskills/hell_slash.lua +++ b/scripts/actions/mobskills/hell_slash.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Hell Slash --- Description: Single target damage. --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Hell Slash +-- Family: Skeleton +-- Description: Single target damage. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,14 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/hellclap.lua b/scripts/actions/mobskills/hellclap.lua index 297d7dca7ff..bf9dcf2e0cc 100644 --- a/scripts/actions/mobskills/hellclap.lua +++ b/scripts/actions/mobskills/hellclap.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Hellclap --- Deals magical damage to enemies within a fan-shaped area. Additional effect: Weight +-- Family: Dvergr +-- Description: Deals damage to enemies within a fan-shaped area. Additional Effect: Knockback, Weight ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,16 +11,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 10 - local ftp = 4.0 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded * math.random(2, 3)) + local params = {} - xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.WEIGHT, 40, 0, 60) + -- TODO: Capture if magical or physical + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 4.0, 4.0, 4.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + -- TODO: JPWiki states this has knockback - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.WEIGHT, 40, 0, 60) -- TODO: Capture effect power/duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/helldive.lua b/scripts/actions/mobskills/helldive.lua index f933d48fe99..41b7247f101 100644 --- a/scripts/actions/mobskills/helldive.lua +++ b/scripts/actions/mobskills/helldive.lua @@ -1,10 +1,8 @@ ----------------------------------- --- Helldive --- Description: Deals physical damage to a single target. Additional Effect: Knockback --- Notorious Monster / Nightmare version has significantly increased knockback distance --- Type: Physical (Blunt) --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Helldive +-- Family: Lesser Bird +-- Description: Deals physical damage to a single target. Additional Effect: Knockback +-- Notorious Monster / Nightmare version has significantly increased knockback distance ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,14 +12,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/hexa_strike.lua b/scripts/actions/mobskills/hexa_strike.lua index 92652599c69..c864ccd3625 100644 --- a/scripts/actions/mobskills/hexa_strike.lua +++ b/scripts/actions/mobskills/hexa_strike.lua @@ -1,10 +1,7 @@ ----------------------------------- -- Hexa Strike --- +-- Family: Humanoid Club Weaponskill -- Description: Delivers a sixfold attack. Chance of critical hit varies with TP. --- Type: Physical --- Utsusemi/Blink absorb: Shadow per hit --- Range: Melee ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,14 +12,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 6 - local accmod = 1 - local ftp = 1.0 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.CRIT_VARIES, 1.1, 1.2, 1.3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 6 + params.fTP = { 1.0, 1.0, 1.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_6 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/hexidiscs.lua b/scripts/actions/mobskills/hexidiscs.lua index f869e1ddfca..332fb58283e 100644 --- a/scripts/actions/mobskills/hexidiscs.lua +++ b/scripts/actions/mobskills/hexidiscs.lua @@ -1,21 +1,14 @@ ----------------------------------- --- Hexidiscs --- --- Description: A sixfold attack damages targets in a fan-shaped area of effect. --- Type: Physical --- Utsusemi/Blink absorb: 6 shadows --- Range: Unknown cone --- Notes: Only used in "ball" form. +-- Hexidiscs +-- Family: Ghrah +-- Description: A sixfold attack damages targets in a fan-shaped area of effect. +-- Notes: Only used in "ball" form. ----------------------------------- ---@type TMobSkill local mobskillObject = {} ------------------------------------ --- onMobSkillCheck --- if not in Ball form, then ignore. ------------------------------------ mobskillObject.onMobSkillCheck = function(target, mob, skill) - if mob:getAnimationSub() ~= 0 then + if mob:getAnimationSub() ~= 0 then -- Only used in ball form return 1 else return 0 @@ -23,13 +16,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 6 - local accmod = .8 - local ftp = .5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ATK_VARIES, 1.25, 1.25, 1.25) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 6 + params.fTP = { 0.5, 0.5, 0.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT -- TODO: Capture damageType + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_6 -- TODO: Capture shadowBehavior + params.attackMultiplier = { 1.25, 1.25, 1.25 } + params.accuracyModifier = { -50, -50, -50 } -- TODO: Capture accuracy modifier + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/hiden_sokyaku.lua b/scripts/actions/mobskills/hiden_sokyaku.lua index 4f9627a3b7e..c625979471a 100644 --- a/scripts/actions/mobskills/hiden_sokyaku.lua +++ b/scripts/actions/mobskills/hiden_sokyaku.lua @@ -1,11 +1,8 @@ ----------------------------------- -- Hiden Sokyaku --- --- Description: Deals damage to a single target. Additional effect: Stun --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee --- Notes: Stun may or may not take xi.effect. +-- Family: Yagudo +-- Description: Deals damage to a single target. Additional Effect: Stun +-- Notes: Similar to Yagudo Skill "Double Kick" ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,16 +12,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 4) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 2 + params.fTP = { 1.5, 1.5, 1.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) -- TODO: Capture stun duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/high-tension_discharger.lua b/scripts/actions/mobskills/high-tension_discharger.lua index d224a2ef546..c275ff53d86 100644 --- a/scripts/actions/mobskills/high-tension_discharger.lua +++ b/scripts/actions/mobskills/high-tension_discharger.lua @@ -29,7 +29,7 @@ mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) if xi.mobskills.processDamage(mob, target, skill, action, info) then target:takeDamage(info.damage, mob, info.attackType, info.damageType) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 3, 4) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 3, 4) if target:hasStatusEffect(xi.effect.ELEMENTALRES_DOWN) then target:delStatusEffectSilent(xi.effect.ELEMENTALRES_DOWN) diff --git a/scripts/actions/mobskills/hollow_smite.lua b/scripts/actions/mobskills/hollow_smite.lua index baeb2e33869..74bc1332246 100644 --- a/scripts/actions/mobskills/hollow_smite.lua +++ b/scripts/actions/mobskills/hollow_smite.lua @@ -1,7 +1,8 @@ ----------------------------------- -- Hollow Smite +-- Family: Humanoid (Trust: Maat) -- Description: Delivers a fourfold attack. Chance of critical hit varies with TP. --- Type: Physical +-- Notes: Used by Trust: Maat and possibly others ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,14 +12,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 4 - local accmod = 1 - local ftp = 2.25 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.CRIT_VARIES, 1.1, 1.25, 1.45) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.HTH, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.HTH) - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 4 + params.fTP = { 2.25, 2.25, 2.25 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.HTH + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_4 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/hoof_volley.lua b/scripts/actions/mobskills/hoof_volley.lua index 2a8dfd5bb8a..0978d677e6d 100644 --- a/scripts/actions/mobskills/hoof_volley.lua +++ b/scripts/actions/mobskills/hoof_volley.lua @@ -1,11 +1,7 @@ ----------------------------------- --- Hoof Volley --- Family: Hippogryph --- Description: Deals critical damage to a single target. Resets hate and causes knockback. --- Type: Physical --- Utsusemi/Blink absorb: One shadow --- Range: Melee --- Notes: Easily stunnable +-- Hoof Volley +-- Family: Hippogryph +-- Description: Deals critical damage to a single target. Additional Effect: Hate Reset, Knockback ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,19 +11,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 4 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - - if mob:getObjType() == xi.objType.MOB then + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 4.0, 4.0, 4.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + -- TODO: Capture hate reset type (Enmity wipe vs enmity turned off) + -- See Antica skill "Sand Trap" for reference mob:resetEnmity(target) end - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/howling_fist.lua b/scripts/actions/mobskills/howling_fist.lua index 54ee4e5a752..6f716ab09e8 100644 --- a/scripts/actions/mobskills/howling_fist.lua +++ b/scripts/actions/mobskills/howling_fist.lua @@ -1,7 +1,7 @@ ----------------------------------- -- Howling Fist +-- Family: Humanoid Hand to Hand Weaponskill -- Description: Damage varies with TP. --- Type: Physical ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,14 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 2 - local accmod = 1 - local ftp = 1 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.HTH, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.HTH) - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 2 + params.fTP = { 1.0, 1.0, 1.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.HTH + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/hydro_shot.lua b/scripts/actions/mobskills/hydro_shot.lua index 38b8808515f..c0c61fe415c 100644 --- a/scripts/actions/mobskills/hydro_shot.lua +++ b/scripts/actions/mobskills/hydro_shot.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Hydro Shot --- Additional effect: Enmity Down. Chance of effect varies with TP. +-- Family: Sahagin +-- Description: Deals damage to a target. Additional Effect: Enmity Reset, Knockback ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,17 +11,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.HTH, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.ENMITY_DOWN, 10, 3, 120) - mob:resetEnmity(target) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.5, 2.5, 2.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.HTH + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.HTH) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + -- TODO: Capture hate reset type (Enmity wipe vs enmity turned off) + -- See Antica skill "Sand Trap" for reference + mob:resetEnmity(target) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/hyper_pulse.lua b/scripts/actions/mobskills/hyper_pulse.lua index 9483c56923c..d203e778d40 100644 --- a/scripts/actions/mobskills/hyper_pulse.lua +++ b/scripts/actions/mobskills/hyper_pulse.lua @@ -11,17 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.WIPE_SHADOWS) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING, { breakBind = false }) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.WIPE_SHADOWS -- TODO: Capture shadowBehavior - xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIND, 1, 0, 15) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType, { breakBind = false }) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIND, 1, 0, 15) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/hysteric_assault.lua b/scripts/actions/mobskills/hysteric_assault.lua index b5a3c7c3c1c..b8b414746e0 100644 --- a/scripts/actions/mobskills/hysteric_assault.lua +++ b/scripts/actions/mobskills/hysteric_assault.lua @@ -1,5 +1,7 @@ ----------------------------------- -- Hysteric Assault +-- Family: Avatar (Siren) +-- Description: Delivers a fivefold attack. Additional Effect: HP Drain ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -9,15 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 5 - local accmod = 1 - local ftp = 1.0 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - skill:setMsg(xi.mobskills.mobPhysicalDrainMove(mob, target, skill, xi.mobskills.drainType.HP, dmg)) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 5 + params.fTP = { 1.0, 1.0, 1.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_5 -- TODO: Capture shadowBehavior + params.canCrit = true -- TODO: JPWiki states this can crit. Need captures of mobskill and blood pact. + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate (JPWiki says 5~10% at 0 TP to 50~% at 3000TP) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + skill:setMsg(xi.mobskills.mobDrainMove(mob, target, xi.mobskills.drainType.HP, info.damage)) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/hysteric_barrage.lua b/scripts/actions/mobskills/hysteric_barrage.lua index dd773620613..3eaecb73162 100644 --- a/scripts/actions/mobskills/hysteric_barrage.lua +++ b/scripts/actions/mobskills/hysteric_barrage.lua @@ -1,7 +1,8 @@ ----------------------------------- --- Hysteric Barrage --- Description: Delivers a fivefold attack. Damage varies with TP. --- Type: Physical only when weapon is broken +-- Hysteric Barrage +-- Family: Lamia +-- Description: Delivers a fivefold attack. +-- Notes: Only used when weapon is broken ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,15 +15,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end end --- TODO: can crit mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 5 - local accmod = 1 - local ftp = .5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.HTH, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.HTH) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 5 + params.fTP = { 0.667, 0.667, 0.667 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.HTH + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_5 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/impact_roar.lua b/scripts/actions/mobskills/impact_roar.lua index 8e7751f0f5c..d2201de9191 100644 --- a/scripts/actions/mobskills/impact_roar.lua +++ b/scripts/actions/mobskills/impact_roar.lua @@ -1,7 +1,7 @@ ----------------------------------- -- Impact Roar --- Emits the roar of an impact event, dealing damage in a fan-shaped area of effect. --- Ignores Shadows +-- Family: Gigas +-- Description: Emits the roar of an impact event, dealing damage in a fan-shaped area of effect. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,15 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, xi.mobskills.shadowBehavior.IGNORE_SHADOWS) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/impale.lua b/scripts/actions/mobskills/impale.lua index bb7f81e386c..7068d894158 100644 --- a/scripts/actions/mobskills/impale.lua +++ b/scripts/actions/mobskills/impale.lua @@ -1,9 +1,8 @@ ----------------------------------- --- Impale --- Description: Deals damage to a single target. Additional effect: Paralysis (NM version AE applies a strong poison effect and resets enmity on target) --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow (NM version ignores shadows) --- Range: Melee +-- Impale +-- Family: Morbol +-- Description: Deals damage to a single target. Additional Effect: Paralysis (NM version AE applies a strong poison effect and resets enmity on target) +-- Utsusemi/Blink absorb: 1 shadow (NM version ignores shadows) ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,24 +12,34 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local typeEffect = xi.effect.PARALYSIS - local numhits = 1 - local accmod = 1 - local ftp = 2.3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local shadows = info.hitslanded - - if mob:isMobType(xi.mobType.NOTORIOUS) then - shadows = xi.mobskills.shadowBehavior.IGNORE_SHADOWS - typeEffect = xi.effect.POISON - mob:resetEnmity(target) - end + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.attackMultiplier = { 2.0, 2.0, 2.0 } + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, shadows) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, typeEffect, 20, 0, 120) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + -- TODO: We should probably split mobskill varients up like we do with Treant skills. Example: impale_paralysis, impale_poison, etc + local typeEffect = xi.effect.PARALYSIS + if mob:isMobType(xi.mobType.NOTORIOUS) then + -- TODO: Capture hate reset type (Enmity wipe vs enmity turned off) + -- See Antica skill "Sand Trap" for reference + mob:resetEnmity(target) + typeEffect = xi.effect.POISON + end + + xi.mobskills.mobStatusEffectMove(mob, target, typeEffect, 20, 0, 120) + end - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/impalement.lua b/scripts/actions/mobskills/impalement.lua index 70cf5b59103..6cfc59f4d25 100644 --- a/scripts/actions/mobskills/impalement.lua +++ b/scripts/actions/mobskills/impalement.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Impalement --- Description: Deals damage to a single target reducing their HP to 5%. Resets enmity. --- Type: Physical --- Utsusemi/Blink absorb: No --- Range: Single Target +-- Impalement +-- Family: Craver +-- Description: Deals damage to a single target reducing their HP to 5%. Resets enmity. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,20 +11,31 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local currentHP = target:getHP() - local stab = currentHP * .95 - local info = - { - damage = stab - } + local params = {} - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, xi.mobskills.shadowBehavior.IGNORE_SHADOWS) + params.baseDamage = target:getHP() + params.numHits = 1 + params.fTP = { 0.95, 0.95, 0.95 } -- TODO: Capture % of current HP this does. + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS + params.skipFSTR = true + params.skipPDIF = true + params.skipParry = true -- TODO: Confirm this can't be parried, guarded or blocked. + params.skipGuard = true + params.skipBlock = true - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - mob:resetEnmity(target) + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) - return dmg + -- TODO: Capture hate reset type (Enmity wipe vs enmity turned off) + -- See Antica skill "Sand Trap" for reference + mob:resetEnmity(target) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/imperial_authority.lua b/scripts/actions/mobskills/imperial_authority.lua index 6292c00983c..1ad47c86ecc 100644 --- a/scripts/actions/mobskills/imperial_authority.lua +++ b/scripts/actions/mobskills/imperial_authority.lua @@ -1,7 +1,7 @@ ----------------------------------- --- Imperial Authority (Nashmeira, Nashmeira II) --- Deals damage to a single target. Additional effect: Stun --- Type: Physical (Hand-to-Hand) +-- Imperial Authority +-- Family: Humanoid (Nashmeira, Nashmeira II) +-- Description: Deals damage to a single target. Additional Effect: Stun -- Skillchain Properties: Fragmentation/Distortion ----------------------------------- ---@type TMobSkill @@ -12,17 +12,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 0.3 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, mob:getWeaponDmg() * ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.HTH, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 10) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 0.3, 0.3, 0.3 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.HTH) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 10) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/impulse_drive.lua b/scripts/actions/mobskills/impulse_drive.lua index e4aefe20fff..e6b87d06bc8 100644 --- a/scripts/actions/mobskills/impulse_drive.lua +++ b/scripts/actions/mobskills/impulse_drive.lua @@ -1,8 +1,7 @@ ----------------------------------- -- Impulse Drive --- Delivers a two-hit attack --- Type: Physical --- Range: Melee +-- Family: Humanoid Polearm Weaponskill +-- Description: Delivers a two-hit attack ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,23 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 2 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ATK_VARIES, 1, 1, 1) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) - - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - - if dmg > 0 then - local resist = applyResistanceAddEffect(mob, target, xi.element.ICE, 0) - if not target:hasStatusEffect(xi.effect.BIND) and resist >= 0.5 then - local duration = (5 + 5) * resist - target:addStatusEffect(xi.effect.BIND, { power = 1, duration = duration, origin = mob }) - end + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 2 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIND, 1, 0, 10) -- end - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/incensed_pummel.lua b/scripts/actions/mobskills/incensed_pummel.lua index 801f18d91d2..811ccd1756e 100644 --- a/scripts/actions/mobskills/incensed_pummel.lua +++ b/scripts/actions/mobskills/incensed_pummel.lua @@ -1,5 +1,7 @@ ----------------------------------- -- Incensed Pummel +-- Family: Yztarg (Red) +-- Description: Deals a sixfold? attack. Additional Effect: Random Stat Attribute Down ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -9,18 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.0 - -- Random stat down - local typeEffect = 136 + math.random(0, 6) -- 136 is xi.effect.STR_DOWN add 0 to 6 for all 7 of the possible attribute reductions + local params = {} - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.IGNORE_SHADOWS) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 -- TODO: Capture numHits + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS -- TODO: Capture shadowBehavior - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, typeEffect, 20, 3, 120) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + local typeEffect = xi.effect.STR_DOWN + math.random(0, 6) + xi.mobskills.mobStatusEffectMove(mob, target, typeEffect, 20, 9, 120) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/incessant_fists.lua b/scripts/actions/mobskills/incessant_fists.lua index 3f9ba039471..4e2d7b7c2d4 100644 --- a/scripts/actions/mobskills/incessant_fists.lua +++ b/scripts/actions/mobskills/incessant_fists.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Incessant Fists --- Description: Delivers a fivefold punching attack to a single target. --- Type: Physical --- Utsusemi/Blink absorb: 5 shadows --- Range: Unknown +-- Incessant Fists +-- Family: Troll (Gurfurlur the Menacing) +-- Description: Delivers a fivefold punching attack to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,14 +11,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 5 - local accmod = 1 - local ftp = 1.3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 5 + params.fTP = { 1.3, 1.3, 1.3 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_5 + -- TODO: Possible Accuracy Modifer + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/infernal_deliverance.lua b/scripts/actions/mobskills/infernal_deliverance.lua index a1bb388e168..6084378bde2 100644 --- a/scripts/actions/mobskills/infernal_deliverance.lua +++ b/scripts/actions/mobskills/infernal_deliverance.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Infernal Deliverance --- Description: Deals damage to targets in range. Additional effect: Stun +-- Family: Promathia +-- Description: Deals damage to targets in range. Additional Effect: Stun ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,17 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 0, 0, 10) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 0, 0, 10) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/insipid_nip.lua b/scripts/actions/mobskills/insipid_nip.lua index 4babf266b3c..7aeca2c776f 100644 --- a/scripts/actions/mobskills/insipid_nip.lua +++ b/scripts/actions/mobskills/insipid_nip.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Insipid Nip --- Description: Single target damage. Additional effect: Absorbs a random attribute --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Insipid Nip +-- Family: Gnat +-- Description: Single target damage. Additional Effect: Absorbs a random attribute ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,18 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 2 - local ftp = 3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) - - if xi.mobskills.mobPhysicalHit(skill) then - target:dispelStatusEffect() + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobDrainAttribute(mob, target, xi.effect.STR_DOWN + math.random(0, 6), math.random(25, 30), 9, 120) end - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/javelin_throw.lua b/scripts/actions/mobskills/javelin_throw.lua index af5daea5af8..a1ab555b1cf 100644 --- a/scripts/actions/mobskills/javelin_throw.lua +++ b/scripts/actions/mobskills/javelin_throw.lua @@ -1,18 +1,15 @@ ----------------------------------- --- Javelin Throw --- --- Description: Ranged attack with the equipped weapon, which is lost. --- Type: Ranged --- Utsusemi/Blink absorb: 1 shadow --- Range: 7.0 --- Notes: Only used by armed DRG Mamool Ja +-- Javelin Throw +-- Family: Mamool Ja +-- Description: Ranged attack with the equipped weapon, which is lost. +-- Notes: Used by armed DRG Mamool Ja ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) -- If animationSub is non-zero, mob has already lost the weapon. - if mob:getAnimationSub() == 0 and mob:getMainJob() == xi.job.DRG then + if mob:getAnimationSub() == 0 and mob:getMainJob() == xi.job.DRG then -- TODO: Set proper skill lists return 0 end @@ -20,14 +17,27 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.skipParry = true + params.skipGuard = true + params.skipBlock = true + + local info = xi.mobskills.mobRangedMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + skill:setFinalAnimationSub(2) - local numhits = 1 - local accmod = 1 - local dmgmod = 1 - local info = xi.mobskills.mobRangedMove(mob, target, skill, numhits, accmod, dmgmod, xi.mobskills.physicalTpBonus.ACC_VARIES) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.RANGED, xi.damageType.PIERCING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.RANGED, xi.damageType.PIERCING) - return dmg + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/jet_stream.lua b/scripts/actions/mobskills/jet_stream.lua index 9b61e094272..b8bcd28660b 100644 --- a/scripts/actions/mobskills/jet_stream.lua +++ b/scripts/actions/mobskills/jet_stream.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Jet Stream --- Delivers a threefold attack. Accuracy varies with TP. +-- Family: Bats (Trio) +-- Description: Delivers a threefold attack. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,13 +11,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ACC_VARIES, 1, 1.5, 2) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 + -- TODO: Possible accuracy modifier + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/judgment.lua b/scripts/actions/mobskills/judgment.lua index 7864bf6aeef..160ddbc3911 100644 --- a/scripts/actions/mobskills/judgment.lua +++ b/scripts/actions/mobskills/judgment.lua @@ -1,8 +1,7 @@ ----------------------------------- -- Judgment +-- Family: Humanoid Club Weaponskill -- Description: Delivers a single-hit attack. Damage varies with TP. --- Type: Physical --- Range: Melee ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,14 +12,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 0.6 - local ftp = 3.0 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ACC_VARIES, 2.0, 2.5, 3.0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/jump.lua b/scripts/actions/mobskills/jump.lua index 426da11c52b..d42b5dd26c0 100644 --- a/scripts/actions/mobskills/jump.lua +++ b/scripts/actions/mobskills/jump.lua @@ -1,7 +1,7 @@ ----------------------------------- -- Jump --- Jumping Attack, only used by dragoon orcs. --- 100% TP: ??? / 200% TP: ??? / 300% TP: ??? +-- Family: Orc +-- Description: Jumping Attack, used by DRG orcs. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,14 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 + (mob:getStat(xi.mod.VIT) / 256) - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + local fTP = 1 + mob:getStat(xi.mod.VIT) / 256 + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { fTP, fTP, fTP } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/jumping_thrust.lua b/scripts/actions/mobskills/jumping_thrust.lua index 0ecfafd0fc3..538032277c5 100644 --- a/scripts/actions/mobskills/jumping_thrust.lua +++ b/scripts/actions/mobskills/jumping_thrust.lua @@ -1,7 +1,7 @@ ----------------------------------- -- Jumping Thrust --- Jumping Attack, only used by dragoons --- 100% TP: ??? / 200% TP: ??? / 300% TP: ??? +-- Family: Sahagin +-- Description: Jumping Attack, used by DRG Sahagin ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,14 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - - return dmg + local params = {} + + local fTP = 1 + mob:getStat(xi.mod.VIT) / 256 + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { fTP, fTP, fTP } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/kick_back.lua b/scripts/actions/mobskills/kick_back.lua index a18863a6da8..9d53e083d1f 100644 --- a/scripts/actions/mobskills/kick_back.lua +++ b/scripts/actions/mobskills/kick_back.lua @@ -1,13 +1,13 @@ ----------------------------------- -- Kick Back --- Deals critical damage. Chance of critical hit varies with TP. --- 100% TP: ??? / 200% TP: ??? / 300% TP: ??? +-- Family: Shadow Lord +-- Description: Deals critical damage. Chance of critical hit varies with TP. ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - if mob:getAnimationSub() == 1 then + if mob:getAnimationSub() == 1 then -- Used only during melee stance return 1 else return 0 @@ -15,13 +15,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.CRIT_VARIES, 1, 2, 3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.2, 2.2, 2.2 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/kick_out.lua b/scripts/actions/mobskills/kick_out.lua index 9ab9304c747..97aebbbba8e 100644 --- a/scripts/actions/mobskills/kick_out.lua +++ b/scripts/actions/mobskills/kick_out.lua @@ -1,11 +1,9 @@ ----------------------------------- -- Kick Out --- --- Description: Deals heavy damage and inflicts blind to any target behind user. --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows --- Range: Unknown cone, backwards --- Notes: Only used when the Behemoth is attacking with its tail. +-- Family: Behemoth +-- Description: Conal AoE damage to targets in range. Additional Effect: Blind +-- Notes: Only used when the Behemoth is attacking with its tail. +-- Used by King Behemoth. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -19,16 +17,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = math.random(2, 3) - local accmod = 1 - local ftp = 3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.HTH, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BLINDNESS, 20, 0, 120) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.HTH + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.HTH) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BLINDNESS, 20, 0, 120) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/king_cobra_clamp.lua b/scripts/actions/mobskills/king_cobra_clamp.lua index 323b1569768..907fb0c6121 100644 --- a/scripts/actions/mobskills/king_cobra_clamp.lua +++ b/scripts/actions/mobskills/king_cobra_clamp.lua @@ -1,8 +1,7 @@ ----------------------------------- -- King Cobra Clamp --- Damage varies with TP. --- Type: Magical --- Utsusemi/Blink absorb: Ignores shadows +-- Family: Humanoid (Nanaa Mihgo) +-- Description: Damage varies with TP. Additional Effect: Stun -- Skillchain Properties: Fragmentation ----------------------------------- ---@type TMobSkill @@ -13,16 +12,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3.0 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 4) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS -- TODO: Capture shadowBehavior - target:takeDamage(dmg, mob, xi.attackType.MAGICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) -- TODO: Capture stun duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/knights_of_round.lua b/scripts/actions/mobskills/knights_of_round.lua index 81d13269f70..c633ca0f8cb 100644 --- a/scripts/actions/mobskills/knights_of_round.lua +++ b/scripts/actions/mobskills/knights_of_round.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Knights of Round --- --- Description: Excalibur/Caliburn: Regen. --- Type: Physical --- Range: Melee +-- Knights of Round +-- Family: Humanoid Sword Weaponskill +-- Description: Deals physical damage to a target. Excalibur/Caliburn: Regen. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,15 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.5 + local params = {} - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.5, 2.5, 2.5 } -- TODO: Capture fTPS + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/lamb_chop.lua b/scripts/actions/mobskills/lamb_chop.lua index 478fca3de88..dc382d80b88 100644 --- a/scripts/actions/mobskills/lamb_chop.lua +++ b/scripts/actions/mobskills/lamb_chop.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Lamb Chop --- Deals critical damage. +-- Family: Sheep +-- Description: Deals physical damage to a target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/lateral_slash.lua b/scripts/actions/mobskills/lateral_slash.lua index 36ddff1421b..6a183e9a8d1 100644 --- a/scripts/actions/mobskills/lateral_slash.lua +++ b/scripts/actions/mobskills/lateral_slash.lua @@ -1,11 +1,8 @@ ----------------------------------- --- Lateral Slash --- --- Description: Laterally slashes a single target. Additional effect: Defense Down --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee --- Notes: Reduces defense by 75%. Can be removed with Monk Job Ability Counterstance. +-- Lateral Slash +-- Family: Tonberry +-- Description: Deals physical damage a single target. Additional Effect: Defense Down +-- Notes: Reduces defense by 83~%. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,16 +12,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 2 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.DEFENSE_DOWN, 83, 0, 30) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.DEFENSE_DOWN, 83, 0, 30) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/leaf_dagger.lua b/scripts/actions/mobskills/leaf_dagger.lua index 5d8c67ee48d..cf0e2c19c5e 100644 --- a/scripts/actions/mobskills/leaf_dagger.lua +++ b/scripts/actions/mobskills/leaf_dagger.lua @@ -1,10 +1,9 @@ ----------------------------------- --- Leaf Dagger --- --- Description: Deals piercing damage to a single target. Additional effect: Poison --- Type: Physical (Ranged) --- Notes: On higher level Madragoras (Korrigans for example) the poision is 5hp/tick for about 5-6 ticks, damaging a total of 25-30 HP. --- TODO: Should be subject to ranged penalties. +-- Leaf Dagger +-- Family: Mandragora +-- Description: Deals piercing damage to a single target. Additional Effect: Poison +-- Notes: On higher level Madragoras (Korrigans for example) the poision is 5hp/tick for about 5-6 ticks, damaging a total of 25-30 HP. +-- TODO: Should be subject to ranged penalties. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,18 +13,28 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) - local power = math.max(1, mob:getMainLvl() / 10) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.skipParry = true + params.skipGuard = true + params.skipBlock = true - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.POISON, power, 3, 90) + local info = xi.mobskills.mobRangedMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + local power = math.max(1, mob:getMainLvl() / 10) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.POISON, power, 3, 90) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/leaping_cleave.lua b/scripts/actions/mobskills/leaping_cleave.lua index 0283bb56a6e..a9c6a1d161c 100644 --- a/scripts/actions/mobskills/leaping_cleave.lua +++ b/scripts/actions/mobskills/leaping_cleave.lua @@ -1,11 +1,9 @@ ----------------------------------- --- Leaping Cleave --- Family: Qutrub --- Description: Performs a jumping slash on a single target. --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee --- Notes: Used only when wielding their initial sword. +-- Leaping Cleave +-- Family: Qutrub +-- Description: Performs a jumping slash on a single target. Additional Effect: Stun +-- Notes: Used only when wielding their initial sword. +-- TODO: Jimmayus spreadsheet says this is also used in dagger form? ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -19,17 +17,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 3 - local ftp = 2.25 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - local duration = xi.mobskills.calculateDuration(mob:getTP(), 15, 30) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, duration) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.25, 2.25, 2.25 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + local duration = xi.mobskills.calculateDuration(mob:getTP(), 15, 30) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, duration) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/lethe_arrows.lua b/scripts/actions/mobskills/lethe_arrows.lua index db91200b474..7e78627975c 100644 --- a/scripts/actions/mobskills/lethe_arrows.lua +++ b/scripts/actions/mobskills/lethe_arrows.lua @@ -1,9 +1,7 @@ ----------------------------------- -- Lethe Arrows --- Description: Deals a ranged attack to target. Additional effect: Knockback, Bind, and Amnesia --- Type: Ranged --- Utsusemi/Blink absorb: Ignores Utsusemi --- Range: Unknown +-- Family: Pixie +-- Description: Deals a ranged attack to target. Additional Effect: Amnesia, Bind, Knockback ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,17 +11,27 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 3 - local ftp = 4 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.RANGED, xi.damageType.PIERCING, xi.mobskills.shadowBehavior.IGNORE_SHADOWS) + local params = {} - xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIND, 1, 0, 120) - xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.AMNESIA, 1, 0, 120) + -- TODO: Ranged or physical? + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 4.0, 4.0, 4.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS -- TODO: Capture shadowBehavior - target:takeDamage(dmg, mob, xi.attackType.RANGED, xi.damageType.PIERCING, { breakBind = false }) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType, { breakBind = false }) + + -- TODO: Capture effect power/durations + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIND, 1, 0, 120) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.AMNESIA, 1, 0, 120) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/light_blade.lua b/scripts/actions/mobskills/light_blade.lua index 4563659e8d0..f09720226a0 100644 --- a/scripts/actions/mobskills/light_blade.lua +++ b/scripts/actions/mobskills/light_blade.lua @@ -1,8 +1,8 @@ ----------------------------------- --- Light Blade --- Description: Deals very high physical damage to a single player. --- Type: Ranged --- Damage decreases the farther away the target is from him. +-- Light Blade +-- Family: Humanoid (Kam'lanaut, Mildaurion) +-- Description: Deals very high physical damage to a single player. +-- Notes: Damage decreases the farther away the target is from him. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,18 +12,30 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 6 - local info = xi.mobskills.mobRangedMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.RANGED, xi.damageType.SLASHING, info.hitslanded) + local params = {} + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 6.0, 6.0, 6.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.skipParry = true + params.skipGuard = true + params.skipBlock = true + + local info = xi.mobskills.mobRangedMove(mob, target, skill, action, params) + + -- TODO: Roll this mechanic into the main ranged/physical function local distance = mob:checkDistance(target) distance = utils.clamp(distance, 0, 40) - dmg = dmg * ((50 - distance) / 50) + info.damage = info.damage * ((50 - distance) / 50) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end - target:takeDamage(dmg, mob, xi.attackType.RANGED, xi.damageType.SLASHING) - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/luminous_lance.lua b/scripts/actions/mobskills/luminous_lance.lua index 504835b09cf..73612fb2557 100644 --- a/scripts/actions/mobskills/luminous_lance.lua +++ b/scripts/actions/mobskills/luminous_lance.lua @@ -1,5 +1,6 @@ ----------------------------------- --- Luminous Lance +-- Luminous Lance +-- Family: Selh'teus ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -9,21 +10,28 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local dmgmod = 3 - local info = xi.mobskills.mobRangedMove(mob, target, skill, numhits, accmod, dmgmod, xi.mobskills.magicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.RANGED, xi.damageType.PIERCING, info.hitslanded) - - target:takeDamage(dmg, mob, xi.attackType.RANGED, xi.damageType.PIERCING) - - if dmg > 0 then - -- Cannot be resisted - target:setAnimationSub(3) - target:addStatusEffect(xi.effect.TERROR, { duration = 30, origin = mob }) + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.skipParry = true + params.skipGuard = true + params.skipBlock = true + + local info = xi.mobskills.mobRangedMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + target:setAnimationSub(3) -- TODO: Should animation sub be gated behind the attack landing? + target:addStatusEffect(xi.effect.TERROR, { duration = 30, origin = mob }) -- Can not be resisted end - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/lunar_revolution.lua b/scripts/actions/mobskills/lunar_revolution.lua index 93ee6799087..c7baabb76a8 100644 --- a/scripts/actions/mobskills/lunar_revolution.lua +++ b/scripts/actions/mobskills/lunar_revolution.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Lunar Revolution --- Deals damage in a fan-shaped area extending from the user. +-- Family: Humanoid (Lehko Habhoka) +-- Description: Deals damage in a fan-shaped area extending from the user. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.0 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING -- TODO: Capture damageType + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/maats_bash.lua b/scripts/actions/mobskills/maats_bash.lua index 60207a1c9b9..c8566306d48 100644 --- a/scripts/actions/mobskills/maats_bash.lua +++ b/scripts/actions/mobskills/maats_bash.lua @@ -1,5 +1,8 @@ ----------------------------------- --- Maat's Bash +-- Maat's Bash +-- Family: Humanoid (Maat) +-- Description: Deals physical damage to a target. Additional Effect: Stun +-- Note: Seems to be Maat's version of PLD's "Shield Bash". Used for PLD Maat fight. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -9,16 +12,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.2 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 4) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.2, 1.2, 1.2 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) -- TODO: Capture stun duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/mandible_bite.lua b/scripts/actions/mobskills/mandible_bite.lua index 9eae51a1039..4fc3c12c514 100644 --- a/scripts/actions/mobskills/mandible_bite.lua +++ b/scripts/actions/mobskills/mandible_bite.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Mandible Bite --- Description: Deals damage to a single target. --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Mandible Bite +-- Family: Scorpion +-- Description: Deals damage to a single target. Additional Effect: Knockback ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,14 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ATK_VARIES, 1.5, 1.5, 1.5, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.attackMultiplier = { 1.5, 1.5, 1.5 } + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/mandibular_bite.lua b/scripts/actions/mobskills/mandibular_bite.lua index 1ca06717696..a0a8dae631f 100644 --- a/scripts/actions/mobskills/mandibular_bite.lua +++ b/scripts/actions/mobskills/mandibular_bite.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Mandibular Bite --- Description: Deals damage to a single target. --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Mandibular Bite +-- Family: Antlion +-- Description: Deals damage to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,13 +11,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.7 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.attackMultiplier = { 1.5, 1.5, 1.5 } + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/mangle.lua b/scripts/actions/mobskills/mangle.lua index ed5d8f5902d..b892d134a53 100644 --- a/scripts/actions/mobskills/mangle.lua +++ b/scripts/actions/mobskills/mangle.lua @@ -1,17 +1,17 @@ ----------------------------------- --- Mangle --- Family: Qutrub --- Description: Deals damage in a threefold attack to targets in a fan-shaped area of effect. --- Type: Physical --- Utsusemi/Blink absorb: 3 shadows --- Range: Front cone --- Notes: Used only when wielding their initial sword, or the dagger on their backs. +-- Mangle +-- Family: Qutrub +-- Description: Deals conal AoE damage in a threefold attack to targets in front of the mob. +-- Notes: Used only when wielding their initial sword, or the dagger on their backs. ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - if mob:getAnimationSub() == 0 or mob:getAnimationSub() == 2 then + if + mob:getAnimationSub() == 0 or + mob:getAnimationSub() == 2 + then return 0 else return 1 @@ -19,13 +19,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ACC_VARIES) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + -- TODO: params.accuracyModifier = { 0, 0, 0 } + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/mantle_pierce.lua b/scripts/actions/mobskills/mantle_pierce.lua index ea7c48fa9d3..dc289fbd79e 100644 --- a/scripts/actions/mobskills/mantle_pierce.lua +++ b/scripts/actions/mobskills/mantle_pierce.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Mantle Pierce --- Description: Stabs a single target. Additional effect: Weight --- Type: Physical --- Utsusemi/Blink absorb: 1-3 shadow(s) --- Range: Melee +-- Mantle Pierce +-- Family: Xzomit +-- Description: Deals conal AoE physical damage to targets in front of the mob. Additional Effect: Weight ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,16 +11,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = math.random(1, 3) - local accmod = 2 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.CRIT_VARIES, 1, 1, 1) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.WEIGHT, 75, 0, math.random(15, 45)) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.WEIGHT, 75, 0, math.random(15, 45)) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/medusa_javelin.lua b/scripts/actions/mobskills/medusa_javelin.lua index 45d57e0e6ec..f3ebb64aa7e 100644 --- a/scripts/actions/mobskills/medusa_javelin.lua +++ b/scripts/actions/mobskills/medusa_javelin.lua @@ -1,7 +1,7 @@ ----------------------------------- --- Medusa Javelin --- Aern (DRG & SAM) --- Blinkable 1 hit, Knockback, Hate Reset +-- Medusa Javelin +-- Family: Aern (DRG & SAM) +-- Description: Deals physical damage to a single target. Additional Effect: Knockback, Hate Reset ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,17 +11,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - -- TODO: Need crit scaling captures - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.CRIT_VARIES, 1, 1, 1) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.PETRIFICATION, 1, 0, math.random(30, 60)) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PETRIFICATION, 1, 0, math.random(30, 60)) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/megalith_throw.lua b/scripts/actions/mobskills/megalith_throw.lua index 8060622f1b0..aaf24a4ca1f 100644 --- a/scripts/actions/mobskills/megalith_throw.lua +++ b/scripts/actions/mobskills/megalith_throw.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Megalith Throw --- Titan delivers a ranged attack that slows target. +-- Family: Avatar (Titan) +-- Description: Titan delivers a ranged attack that slows target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,16 +11,27 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local dmgmod = 2.5 - local info = xi.mobskills.mobRangedMove(mob, target, skill, numhits, accmod, dmgmod, xi.mobskills.magicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.SLOW, 1000, 0, 120) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.5, 2.5, 2.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.skipParry = true + params.skipGuard = true + params.skipBlock = true - return dmg + local info = xi.mobskills.mobRangedMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.SLOW, 30, 0, 120) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/mercy_stroke.lua b/scripts/actions/mobskills/mercy_stroke.lua index 6e6f9df51fd..8cecac1ab70 100644 --- a/scripts/actions/mobskills/mercy_stroke.lua +++ b/scripts/actions/mobskills/mercy_stroke.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Mercy Stroke --- --- Description: Mandau/Batardeau: Temporarily improves critical hit rate. --- Type: Physical --- Range: Melee +-- Mercy Stroke +-- Family: Humanoid Dagger Weaponskill +-- Description: Mandau/Batardeau: Temporarily improves critical hit rate. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,15 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.5 -- fTP and fTP scaling unknown. TODO: capture ftp + local params = {} - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.5, 2.5, 2.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/metatron_torment.lua b/scripts/actions/mobskills/metatron_torment.lua index 29ac4dc04c9..295cbd78504 100644 --- a/scripts/actions/mobskills/metatron_torment.lua +++ b/scripts/actions/mobskills/metatron_torment.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Metatron Torment --- --- Description: Lowers target's defense. Bravura/Abaddon Killer: Temporarily lowers damage taken from enemies. --- Type: Physical --- Range: Melee +-- Metatron Torment +-- Family: Humanoid Great Axe Weaponskill +-- Description: Lowers target's defense. Bravura/Abaddon Killer: Temporarily lowers damage taken from enemies. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,20 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.5 -- fTP and fTP scaling unknown. TODO: capture ftp + local params = {} - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.5, 2.5, 2.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - local duration = 60 - local power = 19 + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.DEFENSE_DOWN, power, 0, duration) + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.DEFENSE_DOWN, 19, 0, 60) -- TODO: Capture power/duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/microquake.lua b/scripts/actions/mobskills/microquake.lua index 2d337aab834..933bf48218d 100644 --- a/scripts/actions/mobskills/microquake.lua +++ b/scripts/actions/mobskills/microquake.lua @@ -1,16 +1,13 @@ ----------------------------------- --- Microquake --- --- Description: Deals heavy damage to a single target. --- Type: Physical --- 2-3 Shadows --- Range: Unknown +-- Microquake +-- Family: Mammet +-- Description: Deals heavy damage to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - if mob:getAnimationSub() == 2 then + if mob:getAnimationSub() == 2 then -- Used in polearm form return 0 end @@ -18,14 +15,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_1) - - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.5, 2.5, 2.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/mix_dark_potion.lua b/scripts/actions/mobskills/mix_dark_potion.lua index 10731312953..d92bb0cb087 100644 --- a/scripts/actions/mobskills/mix_dark_potion.lua +++ b/scripts/actions/mobskills/mix_dark_potion.lua @@ -1,5 +1,7 @@ ----------------------------------- --- Mix: Dark Potion - Deals 666 damage to a single enemy. +-- Mix: Dark Potion +-- Family: Monberaux +-- Description: Deals 666 damage to a single enemy. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -9,17 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local darkpot = 666 - local info = - { - damage = darkpot - } + local params = {} - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.NONE, xi.damageType.NONE, xi.mobskills.shadowBehavior.IGNORE_SHADOWS) + params.baseDamage = 666 + params.fTP = { 1, 1, 1 } + params.element = xi.element.NONE + params.attackType = xi.attackType.MAGICAL + params.damageType = xi.damageType.NONE + params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS + params.skipDamageAdjustment = true + params.skipMagicBonusDiff = true - target:takeDamage(dmg, mob, xi.attackType.NONE, xi.damageType.NONE) + local info = xi.mobskills.mobMagicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/moonlit_charge.lua b/scripts/actions/mobskills/moonlit_charge.lua index 008be54448a..bf0e289ae6d 100644 --- a/scripts/actions/mobskills/moonlit_charge.lua +++ b/scripts/actions/mobskills/moonlit_charge.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Moonlit Charge --- Fenrir inflicts Blindness along with a single attack (knockback) to target. +-- Family: Avatar (Fenrir) +-- Description: Deals physical damage to a target. Additional Effect: Blind, Knockback ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,17 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 2 - local ftp = 1.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BLINDNESS, 25, 0, 120) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BLINDNESS, 25, 0, 120) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/morning_glory.lua b/scripts/actions/mobskills/morning_glory.lua index f9446661d07..a87234ff891 100644 --- a/scripts/actions/mobskills/morning_glory.lua +++ b/scripts/actions/mobskills/morning_glory.lua @@ -1,11 +1,8 @@ ----------------------------------- --- Morning Glory --- Family: Euvhi --- Description: Hits nearby targets with a petal bloom. --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows --- --- Only used in "closed" flower state +-- Morning Glory +-- Family: Euvhi +-- Description: Hits nearby targets with a petal bloom. +-- Notes: Only used in "closed" flower state ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -20,14 +17,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.CRIT_VARIES, 1, 1, 1) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) - - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture fTPs + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/mortal_revolution.lua b/scripts/actions/mobskills/mortal_revolution.lua index f979fd2fbac..fae79922522 100644 --- a/scripts/actions/mobskills/mortal_revolution.lua +++ b/scripts/actions/mobskills/mortal_revolution.lua @@ -1,5 +1,7 @@ ----------------------------------- -- Mortal Revolution +-- Family: Chariot +-- Description: Deals physical damage to targets in range of mob. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -9,14 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 2 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/mountain_buster.lua b/scripts/actions/mobskills/mountain_buster.lua index 3d59d1f2f1e..9de952c65dc 100644 --- a/scripts/actions/mobskills/mountain_buster.lua +++ b/scripts/actions/mobskills/mountain_buster.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Mountain Buster --- Titan delivers an earth-shattering attack that roots its target in place. +-- Family: Avatar (Titan) +-- Description: Titan delivers a physical attack on a single target. Additional Effect: Bind ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 2 - local ftp = 2 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BIND, 1, 0, 60) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType, { breakBind = false }) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIND, 1, 0, 60) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/mow.lua b/scripts/actions/mobskills/mow.lua index ca2591e0110..26e250d2d42 100644 --- a/scripts/actions/mobskills/mow.lua +++ b/scripts/actions/mobskills/mow.lua @@ -1,11 +1,8 @@ ----------------------------------- --- Mow --- --- Description: Deals damage in an area of effect. Additional effect: Poison --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows --- Range: Unknown radial --- Notes: Poison can take around 10HP/tick +-- Mow +-- Family: Tauri +-- Description: Deals damage in an area of effect. Additional Effect: Poison +-- Notes: Poison can take around 10HP/tick ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,18 +12,29 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = math.random(2, 3) - local accmod = 0.8 - local ftp = 0.5 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 0.5, 0.5, 0.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.POISON, 25, 3, 30) + -- Notes: Fairly certain this ia a multi hit. Damage logs show at least 2 hit minimum, also got multiple skill ups of the same type from it. + -- 2 seperate Evasion skill ups + 1 parry skill up so likely 2 or 3 hit? - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.POISON, 25, 3, 30) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/namas_arrow.lua b/scripts/actions/mobskills/namas_arrow.lua index e166cd2f11d..b5150bb50d9 100644 --- a/scripts/actions/mobskills/namas_arrow.lua +++ b/scripts/actions/mobskills/namas_arrow.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Namas Arrow --- --- Description: Yoichinoyumi/Futatokoroto: Temporarily improves Ranged Accuracy --- Type: Physical --- Range: Melee +-- Namas Arrow +-- Family: Humanoid Archery Weaponskill +-- Description: Yoichinoyumi/Futatokoroto: Temporarily improves Ranged Accuracy ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,15 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.5 -- fTP and fTP scaling unknown. TODO: capture ftp + local params = {} - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.RANGED, xi.damageType.PIERCING, info.hitslanded) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.5, 2.5, 2.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.skipParry = true + params.skipGuard = true + params.skipBlock = true - target:takeDamage(dmg, mob, xi.attackType.RANGED, xi.damageType.PIERCING) - return dmg + local info = xi.mobskills.mobRangedMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/necrobane.lua b/scripts/actions/mobskills/necrobane.lua index 9e764d78764..c7ee6fd710f 100644 --- a/scripts/actions/mobskills/necrobane.lua +++ b/scripts/actions/mobskills/necrobane.lua @@ -1,5 +1,7 @@ ----------------------------------- -- Necrobane +-- Family: Dvergr +-- Description: Curses targets in range of mob. Also inflicts paralysis to all targets facing mob. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -9,16 +11,9 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.CURSE_I, 1, 0, 60) - - return dmg + -- TODO: Handle message priority/fallback + skill:setMsg(xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.CURSE_I, 50, 0, 60)) -- TODO: Capture duration + xi.mobskills.mobGazeMove(mob, target, xi.effect.PARALYSIS, 25, 0, 60) -- JPwiki states this is a gaze move. TODO: Capture power/duration. end return mobskillObject diff --git a/scripts/actions/mobskills/necropurge.lua b/scripts/actions/mobskills/necropurge.lua index 60012e611b1..223ba088140 100644 --- a/scripts/actions/mobskills/necropurge.lua +++ b/scripts/actions/mobskills/necropurge.lua @@ -1,5 +1,7 @@ ----------------------------------- -- Necropurge +-- Family: Dvergr +-- Description: Deals damage to targets in range of primary target. Additional Effect: Curse, Knockback ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -9,16 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 10 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.CURSE_I, 1, 0, 60) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + -- TODO: Capture Knockback - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.CURSE_I, 50, 0, 60) -- TODO: Capture power/duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/needleshot.lua b/scripts/actions/mobskills/needleshot.lua index 157c34bd819..daff11faf06 100644 --- a/scripts/actions/mobskills/needleshot.lua +++ b/scripts/actions/mobskills/needleshot.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Needleshot --- Description: Fires a needle at a single target. --- Type: Ranged --- Utsusemi/Blink absorb: 1 shadow --- Range: Unknown +-- Needleshot +-- Family: Cactuar +-- Description: Fires a needle at a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,13 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 0.8 - local dmgmod = 2 - local info = xi.mobskills.mobRangedMove(mob, target, skill, numhits, accmod, dmgmod, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.RANGED, xi.damageType.PIERCING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.RANGED, xi.damageType.PIERCING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.RANGED + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.skipParry = true + params.skipGuard = true + params.skipBlock = true + + local info = xi.mobskills.mobRangedMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/netherspikes.lua b/scripts/actions/mobskills/netherspikes.lua index af111f8c300..cafae01a412 100644 --- a/scripts/actions/mobskills/netherspikes.lua +++ b/scripts/actions/mobskills/netherspikes.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Netherspikes --- Description: Deals damage to a single target. Additional effect: Bind --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Netherspikes +-- Family: Fomor +-- Description: Deals conal AoE damage targets. Additional Effect: Bind ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded * 3) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BIND, 1, 0, 30) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture fTPs - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType, { breakBind = false }) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIND, 1, 0, 30) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/nimble_snap.lua b/scripts/actions/mobskills/nimble_snap.lua index a7575ba8abc..774dcb20485 100644 --- a/scripts/actions/mobskills/nimble_snap.lua +++ b/scripts/actions/mobskills/nimble_snap.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Nimble Snap --- Single target damage. +-- Family: Eft +-- Description: Delivers a threefold attack to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.8 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/no_quarter.lua b/scripts/actions/mobskills/no_quarter.lua index 3bc6fa584c7..691c19e2e1e 100644 --- a/scripts/actions/mobskills/no_quarter.lua +++ b/scripts/actions/mobskills/no_quarter.lua @@ -1,5 +1,6 @@ ----------------------------------- -- No Quarter +-- Family: Humanoid (August) ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -9,18 +10,27 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - skill:setFinalAnimationSub(0) - local numhits = 3 - local accmod = 3 - local dmgmod = mob:getWeaponDmg() * 0.35 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, dmgmod, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 0.35, 0.35, 0.35 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 + -- TODO: Possible accuracy mod + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end mob:setMod(xi.mod.DMGPHYS, 0) -- Remove the Phyisical damage taken effect mob:setLocalVar('DaybreakEndTime', GetSystemTime()) + skill:setFinalAnimationSub(0) - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/noble_frenzy.lua b/scripts/actions/mobskills/noble_frenzy.lua index 79b6b5232d5..cffd0e92081 100644 --- a/scripts/actions/mobskills/noble_frenzy.lua +++ b/scripts/actions/mobskills/noble_frenzy.lua @@ -1,5 +1,6 @@ ----------------------------------- -- Noble Frenzy +-- Family: Humanoid (August) ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -9,14 +10,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 5 - local accmod = 2 - local dmgmod = 3.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, dmgmod, xi.mobskills.physicalTpBonus.DMG_VARIES, 1.5625, 1.875, 2.50) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + local params = {} - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 5 + params.fTP = { 5.46875, 6.56250, 8.75000 } -- TODO: Is this right? fTPs seem very excessive. + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_5 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/null_field.lua b/scripts/actions/mobskills/null_field.lua index 4e0502f6579..591e89d15de 100644 --- a/scripts/actions/mobskills/null_field.lua +++ b/scripts/actions/mobskills/null_field.lua @@ -1,5 +1,6 @@ ----------------------------------- -- Null Field +-- Family: Humanoid (August) ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,8 +12,8 @@ end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) local params = {} - params.baseDamage = mob:getMainLvl() * 4.3 - params.fTP = { 1, 1, 1 } + params.baseDamage = mob:getMainLvl() + params.fTP = { 4.3, 4.3, 4.3 } params.element = xi.element.FIRE params.attackType = xi.attackType.MAGICAL params.damageType = xi.damageType.FIRE @@ -22,10 +23,8 @@ mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) if xi.mobskills.processDamage(mob, target, skill, action, info) then target:takeDamage(info.damage, mob, info.attackType, info.damageType) - end - if info.damage > 0 then - mob:addTP(134) + -- mob:addTP(134) -- TODO: Is TP return a set amount or does August's delay influence this? end return info.damage diff --git a/scripts/actions/mobskills/nullsong.lua b/scripts/actions/mobskills/nullsong.lua index 8201f1aef44..31e7a6b9164 100644 --- a/scripts/actions/mobskills/nullsong.lua +++ b/scripts/actions/mobskills/nullsong.lua @@ -1,10 +1,8 @@ ----------------------------------- -- Nullsong +-- Family: Dragon -- Description: Removes all beneficial effects from players in an area of effect. Deals darkness damage for each buff removed. --- Type: Magical --- Utsusemi/Blink absorb: Wipes Shadows --- Range: 15' radial --- NOTE: Only used if target has 3 or more effects to dispel +-- Note: Only used if target has 3 or more effects to dispel ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -21,6 +19,8 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) + local params = {} + local count = target:dispelAllStatusEffect(xi.effectFlag.DISPELABLE) if count == 0 then @@ -28,15 +28,22 @@ mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) return count end - local info = - { - damage = 117 * count - } + params.baseDamage = 117 + params.fTP = { count, count, count } + params.element = xi.element.NONE + params.attackType = xi.attackType.MAGICAL + params.damageType = xi.damageType.NONE + params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS + params.skipDamageAdjustment = true -- TODO: Affected by shell? + params.skipMagicBonusDiff = true -- TODO: Affected by MDB? + + local info = xi.mobskills.mobMagicalMove(mob, target, skill, action, params) - local damage = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.SPECIAL, xi.damageType.ELEMENTAL, xi.mobskills.shadowBehavior.WIPE_SHADOWS) - target:takeDamage(damage, mob, xi.attackType.SPECIAL, xi.damageType.ELEMENTAL) + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end - return damage + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/numbshroom.lua b/scripts/actions/mobskills/numbshroom.lua index 94c45d140c7..0cddca61822 100644 --- a/scripts/actions/mobskills/numbshroom.lua +++ b/scripts/actions/mobskills/numbshroom.lua @@ -1,9 +1,7 @@ ----------------------------------- -- Queasyshroom --- Additional effect: Fires a mushroom cap, dealing damage to a single target. Additional effect: paralysis. --- Range is 14.7 yalms. --- Piercing damage Ranged Attack. --- Secondary modifiers: INT: 20%. +-- Family: Funguar +-- Description: Fires a mushroom cap, dealing damage to a single target. Additional Effect: paralysis. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -17,18 +15,28 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - skill:setFinalAnimationSub(2) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.PARALYSIS, 25, 0, 180) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PARALYSIS, 25, 0, 180) + end + + skill:setFinalAnimationSub(2) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/oblivion_smash.lua b/scripts/actions/mobskills/oblivion_smash.lua index 5a854277ccc..fef14d6c434 100644 --- a/scripts/actions/mobskills/oblivion_smash.lua +++ b/scripts/actions/mobskills/oblivion_smash.lua @@ -1,10 +1,7 @@ ----------------------------------- -- Oblivion Smash --- +-- Family: Shadow Lord (Dynamis Lord) -- Description: Deals damage to players within area of effect and inflicts blind, silence, bind, and weight. --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows --- Range: Unknown radial ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,19 +11,28 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 2.5 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BLINDNESS, 20, 0, 120) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.SILENCE, 0, 0, 120) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BIND, 0, 0, 120) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.WEIGHT, 50, 0, 120) - - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 -- TODO: Capture numHits + params.fTP = { 2.5, 2.5, 2.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + -- TODO: Capture effects and effect power/duration + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BLINDNESS, 20, 0, 120) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.SILENCE, 0, 0, 120) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIND, 0, 0, 120) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.WEIGHT, 50, 0, 120) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/oisoya.lua b/scripts/actions/mobskills/oisoya.lua index 5c4938bb9ea..e09b8d6bbeb 100644 --- a/scripts/actions/mobskills/oisoya.lua +++ b/scripts/actions/mobskills/oisoya.lua @@ -1,10 +1,7 @@ ----------------------------------- --- Oisoya --- Description: --- Type: Weaponskill --- Utsusemi/Blink absorb: --- Range: Ranged Attack --- Notes: Unique ranged weaponskill used by Tenzen during The Warrior's Path. Also used by Trust: Tenzen II. +-- Oisoya +-- Family: Humanoid (Tenzen) +-- Description: Unique ranged weaponskill used by Tenzen during The Warrior's Path. Also used by Trust: Tenzen II. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,7 +10,7 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) if (mob:getAnimationSub() == 5 or mob:getAnimationSub() == 6) and - mob:getLocalVar('[Tenzen]ShouldOisoya') == 1 + mob:getLocalVar('[Tenzen]ShouldOisoya') == 1 -- TODO: Move to mob script then -- if tenzen is in bow mode return 0 end @@ -22,15 +19,27 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 0.8 - local ftp = 5.5 + local params = {} - local info = xi.mobskills.mobRangedMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ATK_VARIES, 2.75, 2.75, 2.75) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.RANGED, xi.damageType.PIERCING, info.hitslanded) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 5.5, 5.5, 5.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.attackMultiplier = { 2.75, 2.75, 2.75 } + params.skipParry = true + params.skipGuard = true + params.skipBlock = true + -- TODO: Accuracy modifier - target:takeDamage(dmg, mob, xi.attackType.RANGED, xi.damageType.PIERCING) - return dmg + local info = xi.mobskills.mobRangedMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/omega_javelin.lua b/scripts/actions/mobskills/omega_javelin.lua index 36f53bbac70..b14bce0c54b 100644 --- a/scripts/actions/mobskills/omega_javelin.lua +++ b/scripts/actions/mobskills/omega_javelin.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Omega Javelin --- Pierces a single target with an ethereal javelin. Additional effect: Petrification +-- Family: Eald'narche +-- Description: Pierces a single target with an ethereal javelin. Additional Effect: Petrification ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,18 +11,28 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_3) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.PETRIFICATION, 1, 0, 45) - mob:resetEnmity(target) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PETRIFICATION, 1, 0, 45) + + -- TODO: Capture hate reset type (Enmity wipe vs enmity turned off) + -- See Antica skill "Sand Trap" for reference + mob:resetEnmity(target) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/one-ilm_punch.lua b/scripts/actions/mobskills/one-ilm_punch.lua index d70e3cf6522..f2594258bbc 100644 --- a/scripts/actions/mobskills/one-ilm_punch.lua +++ b/scripts/actions/mobskills/one-ilm_punch.lua @@ -1,7 +1,7 @@ ----------------------------------- -- One-Ilm Punch +-- Family: Humanoid Hand to Hand Weaponskill -- Description: Damage varies with TP. --- Type: Physical ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,14 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.HTH, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.HTH) - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.HTH + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/onrush.lua b/scripts/actions/mobskills/onrush.lua index edcb7cd2a3e..7a6945c4d56 100644 --- a/scripts/actions/mobskills/onrush.lua +++ b/scripts/actions/mobskills/onrush.lua @@ -1,7 +1,7 @@ ----------------------------------- -- Onrush --- Deals damage based off TP. --- 100% TP: ??? / 250% TP: ??? / 300% TP: ??? +-- Family: Marid +-- Description: Deals damage based off TP. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,15 +10,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) return 0 end --- TODO: can crit mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.HTH, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.HTH) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.HTH + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/onslaught.lua b/scripts/actions/mobskills/onslaught.lua index e99f4beac9c..044f78b1af5 100644 --- a/scripts/actions/mobskills/onslaught.lua +++ b/scripts/actions/mobskills/onslaught.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Onslaught --- --- Description: Lowers target's accuracy. Guttler/Ogre Killer: Temporarily increases Attack. --- Type: Physical --- Range: Melee +-- Onslaught +-- Family: Humanoid Axe Weaponskill +-- Description: Lowers target's accuracy. Guttler/Ogre Killer: Temporarily increases Attack. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,21 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.5 -- fTP and fTP scaling unknown. TODO: capture ftp + local params = {} - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.5, 2.5, 2.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - local duration = 60 - local power = 30 + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.ACCURACY_DOWN, power, 0, duration) + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) - -- About 300-400 to a DD. - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + -- TODO: Capture power/duration + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.ACCURACY_DOWN, 30, 0, 60) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/optic_induration.lua b/scripts/actions/mobskills/optic_induration.lua index ef0ac923e3f..1afc61550d6 100644 --- a/scripts/actions/mobskills/optic_induration.lua +++ b/scripts/actions/mobskills/optic_induration.lua @@ -1,11 +1,8 @@ ----------------------------------- --- Optic Induration --- --- Description: Charges up a powerful, calcifying beam directed at targets in a fan-shaped area of effect. Additional effect: Petrification & enmity reset --- Type: Magical --- Utsusemi/Blink absorb: Ignores shadows --- Range: Unknown cone --- Notes: Charges up (three times) before actually being used (except Jailer of Temperance, who doesn't need to charge it up). The petrification lasts a very long time. +-- Optic Induration +-- Family: Zdei +-- Description: Charges up a powerful, calcifying beam directed at targets in a fan-shaped area of effect. Additional Effect: Petrification & enmity reset +-- Notes: Charges up (three times) before actually being used (except Jailer of Temperance, who doesn't need to charge it up). The petrification lasts a very long time. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,18 +12,30 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 6 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.CRIT_VARIES, 1, 1, 1) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, xi.mobskills.shadowBehavior.IGNORE_SHADOWS) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 6.0, 6.0, 6.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.PETRIFICATION, 1, 0, math.random(15, 60)) - mob:resetEnmity(target) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PETRIFICATION, 1, 0, math.random(15, 60)) + + -- TODO: Capture hate reset type (Enmity wipe vs enmity turned off) + -- See Antica skill "Sand Trap" for reference + mob:resetEnmity(target) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/ore_toss.lua b/scripts/actions/mobskills/ore_toss.lua index b24ce2457f5..8958960de90 100644 --- a/scripts/actions/mobskills/ore_toss.lua +++ b/scripts/actions/mobskills/ore_toss.lua @@ -1,10 +1,7 @@ ----------------------------------- --- Ore Toss --- --- Description: Deals high damage in a ranged attack. --- Type: Ranged --- Utsusemi/Blink absorb: Yes --- Range: Unknown range +-- Ore Toss +-- Family: Quadav +-- Description: Deals high damage in a ranged attack. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,22 +11,31 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobRangedMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.RANGED, xi.damageType.BLUNT, xi.mobskills.shadowBehavior.NUMSHADOWS_1) + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.RANGED + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.skipParry = true + params.skipGuard = true + params.skipBlock = true + + local info = xi.mobskills.mobRangedMove(mob, target, skill, action, params) -- Distance-based damage scaling: 1x at 1 yalm, 3x at 10 yalms -- TODO: Determine max distance of skill local distance = mob:checkDistance(target) local distanceMultiplier = utils.clamp(1 + (distance - 1) * 2 / 9, 1, 3) + info.damage = info.damage * distanceMultiplier - dmg = math.floor(dmg * distanceMultiplier) - - target:takeDamage(dmg, mob, xi.attackType.RANGED, xi.damageType.BLUNT) + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/overthrow.lua b/scripts/actions/mobskills/overthrow.lua index 4f620cb669b..7cd32a7d7e5 100644 --- a/scripts/actions/mobskills/overthrow.lua +++ b/scripts/actions/mobskills/overthrow.lua @@ -1,10 +1,7 @@ ----------------------------------- --- Overthrow --- --- Description: Throws a target backward. --- Type: Physical --- Utsusemi/Blink absorb: Ignores shadows --- Range: Melee +-- Overthrow +-- Family: Troll +-- Description: Throws a target backward. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -19,13 +16,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.HTH, xi.mobskills.shadowBehavior.IGNORE_SHADOWS) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.HTH) - return dmg + local params = {} + + -- TODO: JPWiki says this may scale based on mob's current HP and may be affected by Quake Stomp. + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.HTH + params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/painful_whip.lua b/scripts/actions/mobskills/painful_whip.lua index e12b2cc9f79..c0bf6442908 100644 --- a/scripts/actions/mobskills/painful_whip.lua +++ b/scripts/actions/mobskills/painful_whip.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Painful Whip --- Deals Water damage to targets in a fan-shaped area of effect. Additional effect: Poison +-- Family: Uragnite +-- Description: Deals physical damage to a target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,15 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local ftp = 3.0 - local accmod = 1 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) + local params = {} - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/palsynyxis.lua b/scripts/actions/mobskills/palsynyxis.lua index b0c75a465ea..7cba78c036f 100644 --- a/scripts/actions/mobskills/palsynyxis.lua +++ b/scripts/actions/mobskills/palsynyxis.lua @@ -1,10 +1,7 @@ ----------------------------------- --- Palsynyxis --- --- Description: Single target damage. Additional effect: Paralysis --- Type: Physical --- Utsusemi/Blink absorb: 1 shadows --- Range: Unknown radial +-- Palsynyxis +-- Family: Uragnite +-- Description: Single target damage. Additional Effect: Paralysis ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.PARALYSIS, 25, 0, 120) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PARALYSIS, 25, 0, 120) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/pandemic_nip.lua b/scripts/actions/mobskills/pandemic_nip.lua index 25707a5282c..f80085377d2 100644 --- a/scripts/actions/mobskills/pandemic_nip.lua +++ b/scripts/actions/mobskills/pandemic_nip.lua @@ -1,11 +1,8 @@ ----------------------------------- --- Pandemic Nip --- --- Description: Single target damage and transfers up to five current enfeebles to target player. --- Type: Physical? --- Utsusemi/Blink absorb: 1 shadow? --- Range: Melee --- Notes: Transfers debuffs to the target player (maximum 5). Includes Dancer's Quickstep's Evasion Down and Box Step's Defense Down. +-- Pandemic Nip +-- Family: Gnat +-- Description: Single target damage and transfers up to five current enfeebles to target player. +-- Notes: Transfers debuffs to the target player (maximum 5). Includes Dancer's Quickstep's Evasion Down and Box Step's Defense Down. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,13 +12,112 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 2 - local ftp = 3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + --[[local removables = + { + -- Songs + xi.effect.ELEGY, + xi.effect.REQUIEM, + xi.effect.THRENODY, + xi.effect.NOCTURNE, + + -- Enfeebling + xi.effect.FLASH, + xi.effect.BLINDNESS, + xi.effect.PARALYSIS, + xi.effect.POISON, + xi.effect.CURSE_I, + xi.effect.CURSE_II, + xi.effect.DISEASE, + xi.effect.PLAGUE, + xi.effect.WEIGHT, + xi.effect.BIND, + xi.effect.ADDLE, + xi.effect.SLOW, + xi.effect.INUNDATION, + + -- DoTs + xi.effect.BIO, + xi.effect.DIA, + xi.effect.BURN, + xi.effect.FROST, + xi.effect.CHOKE, + xi.effect.RASP, + xi.effect.SHOCK, + xi.effect.DROWN, + xi.effect.HELIX, + -- TODO : Check if Kaustra should be included + + -- Main Stat Downs + xi.effect.STR_DOWN, + xi.effect.DEX_DOWN, + xi.effect.VIT_DOWN, + xi.effect.AGI_DOWN, + xi.effect.INT_DOWN, + xi.effect.MND_DOWN, + xi.effect.CHR_DOWN, + + -- Combat Stat Downs + xi.effect.ACCURACY_DOWN, + xi.effect.ATTACK_DOWN, + xi.effect.EVASION_DOWN, + xi.effect.DEFENSE_DOWN, + + -- Magic Stat Downs + xi.effect.MAGIC_ACC_DOWN, + xi.effect.MAGIC_ATK_DOWN, + xi.effect.MAGIC_EVASION_DOWN, + xi.effect.MAGIC_DEF_DOWN, + + -- HP/MP/TP Stat Downs + xi.effect.MAX_TP_DOWN, + xi.effect.MAX_MP_DOWN, + xi.effect.MAX_HP_DOWN, + xi.effect.INHIBIT_TP, + + -- Dancer Debuffs + xi.effect.WEAKENED_DAZE_1, + xi.effect.WEAKENED_DAZE_2, + xi.effect.WEAKENED_DAZE_3, + xi.effect.WEAKENED_DAZE_4, + xi.effect.WEAKENED_DAZE_5, + xi.effect.SLUGGISH_DAZE_1, + xi.effect.SLUGGISH_DAZE_2, + xi.effect.SLUGGISH_DAZE_3, + xi.effect.SLUGGISH_DAZE_4, + xi.effect.SLUGGISH_DAZE_5, + xi.effect.BEWILDERED_DAZE_1, + xi.effect.BEWILDERED_DAZE_2, + xi.effect.BEWILDERED_DAZE_3, + xi.effect.BEWILDERED_DAZE_4, + xi.effect.BEWILDERED_DAZE_5, + xi.effect.LETHARGIC_DAZE_1, + xi.effect.LETHARGIC_DAZE_2, + xi.effect.LETHARGIC_DAZE_3, + xi.effect.LETHARGIC_DAZE_4, + xi.effect.LETHARGIC_DAZE_5, + }]] + + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + -- TODO: Transfer debuff effects to target + -- JPWiki says 5 effects, Jimmayus spreadsheet says 1 effect. + end + + -- TODO: JPWiki says even if the attack is absorbed by shadows, then the debuffs on the mob are still cleared. Need captures + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/panzerfaust.lua b/scripts/actions/mobskills/panzerfaust.lua index 05b08e045e9..3b16674bf0e 100644 --- a/scripts/actions/mobskills/panzerfaust.lua +++ b/scripts/actions/mobskills/panzerfaust.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Panzerfaust --- Description: Strikes a target twice with an armored fist. Additional effect: Knockback --- Type: Physical --- Utsusemi/Blink absorb: 2 shadows --- Range: Melee +-- Panzerfaust +-- Family: Doll +-- Description: Strikes a target twice with an armored fist. Additional Effect: Knockback ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,15 +11,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 2 - local accmod = 1 - local ftp = 2 + local params = {} - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 2 -- TODO: Confirm numHits + params.fTP = { 2, 2, 2 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 + -- TODO: Capture/confirm knockback - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/panzerschreck.lua b/scripts/actions/mobskills/panzerschreck.lua index 3b30e22ba5f..1a65d82a461 100644 --- a/scripts/actions/mobskills/panzerschreck.lua +++ b/scripts/actions/mobskills/panzerschreck.lua @@ -1,5 +1,7 @@ ----------------------------------- --- Panzerschreck +-- Panzerschreck +-- Family: Doll +-- Description: Delivers a ranged attack on a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -9,15 +11,27 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local params = { canCrit = true } - local info = xi.mobskills.mobRangedMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) + local params = {} - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + params.skipParry = true + params.skipGuard = true + params.skipBlock = true + + local info = xi.mobskills.mobRangedMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/peacebreaker.lua b/scripts/actions/mobskills/peacebreaker.lua index 6ffc8aca42b..eb6c9f3d143 100644 --- a/scripts/actions/mobskills/peacebreaker.lua +++ b/scripts/actions/mobskills/peacebreaker.lua @@ -1,8 +1,9 @@ ----------------------------------- -- Peacebreaker --- Description: Deals damage and increases magic damage taken by target --- Peacebreaker increases Magic Damage Taken on the target (~2x Magic Damage), --- making Naja a good fit with offensive magic jobs such as Rune Fencer. +-- Family: Humanoid (Naja Salaheem) +-- Description: Deals damage to a target. Additional Effect: Magic Defense Down +-- Notes: Peacebreaker increases Magic Damage Taken on the target (~2x Magic Damage), +-- making Naja a good fit with offensive magic jobs such as Rune Fencer. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,17 +13,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.0 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - -- TODO: This should be Increases Magic Damage Taken, but this was faster/easier - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.MAGIC_DEF_DOWN, 50, 0, 60) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + -- TODO: This should be Increases Magic Damage Taken, but this was faster/easier + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.MAGIC_DEF_DOWN, 50, 0, 60) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/pecking_flurry.lua b/scripts/actions/mobskills/pecking_flurry.lua index 9e543e15d77..c90e60a1864 100644 --- a/scripts/actions/mobskills/pecking_flurry.lua +++ b/scripts/actions/mobskills/pecking_flurry.lua @@ -1,5 +1,7 @@ ----------------------------------- -- Pecking Flurry +-- Family: Colibri +-- Description: Delivers a fourfold attack. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -9,13 +11,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 4 - local accmod = 1 - local ftp = 0.75 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 4 + params.fTP = { 0.75, 0.75, 0.75 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_4 + -- TODO: Possible accuracy multiplier + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/pelagic_tempest.lua b/scripts/actions/mobskills/pelagic_tempest.lua index 3c50fd25c2e..2f2ae499157 100644 --- a/scripts/actions/mobskills/pelagic_tempest.lua +++ b/scripts/actions/mobskills/pelagic_tempest.lua @@ -1,11 +1,8 @@ ----------------------------------- --- Pelagic Tempest --- --- Description: Delivers an area attack that inflicts Shock and Terror. --- Type: Physical? --- Utsusemi/Blink absorb: Ignores shadows --- Range: 10' cone --- Notes: Used by Murex affiliated with lightning element. Shock effect is fairly strong (28/tick). +-- Pelagic Tempest +-- Family: Murex +-- Description: Delivers a conal AoE attack to targets in front of mob. Additional Effect: Shock, Terror +-- Notes: Used by Murex affiliated with lightning element. Shock effect is fairly strong (28/tick). ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,18 +12,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 2 - local ftp = 3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.SHOCK, 28, 3, 180) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS -- TODO: Capture shadowBehavior - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.TERROR, 1, 0, 180) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + -- TODO: Capture effect powers/durations + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.SHOCK, 28, 3, 180) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.TERROR, 1, 0, 180) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/penta_thrust.lua b/scripts/actions/mobskills/penta_thrust.lua index cf0ca33b31d..71e1cace932 100644 --- a/scripts/actions/mobskills/penta_thrust.lua +++ b/scripts/actions/mobskills/penta_thrust.lua @@ -1,8 +1,7 @@ ----------------------------------- -- Penta Thrust --- Delivers a five-hit attack --- Type: Physical --- Range: Melee +-- Family: Humanoid Polearm Weaponskill +-- Description: Delivers a five-hit attack to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,16 +11,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 5 - local ftp = 1 - local tp = skill:getTP() - local accmod = 0.8 + 0.1 * math.floor((tp - 1000) / 1000) - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 5 + params.fTP = { 1.0, 1.0, 1.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_5 + -- params.accuracyModifier = { 0, 0, 0 } + -- TODO: Accuracy modifier + -- Old ACC line: 0.8 + 0.1 * math.floor((tp - 1000) / 1000) + -- Assuming this was attempting to modify the hit rate but we now use raw accuracy values rather than directly modifying the hit rate. - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/percussive_foin.lua b/scripts/actions/mobskills/percussive_foin.lua index 3d81467454a..39508de96b1 100644 --- a/scripts/actions/mobskills/percussive_foin.lua +++ b/scripts/actions/mobskills/percussive_foin.lua @@ -1,16 +1,13 @@ ----------------------------------- --- Percussive Foin --- --- Description: Deals damage in a fan-shaped area of effect. --- Type: Physical --- 2-3 Shadows --- Range: Unknown +-- Percussive Foin +-- Family: Mammet +-- Description: Deals damage in a fan-shaped area of effect. ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - if mob:getAnimationSub() == 2 then + if mob:getAnimationSub() == 2 then -- Used in polearm form return 0 end @@ -18,15 +15,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_2) - - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/phantasmal_dance.lua b/scripts/actions/mobskills/phantasmal_dance.lua index d9ecae0f9dd..20f7977f915 100644 --- a/scripts/actions/mobskills/phantasmal_dance.lua +++ b/scripts/actions/mobskills/phantasmal_dance.lua @@ -1,7 +1,8 @@ ----------------------------------- -- Phantasmal Dance --- Deals damage to nearby players with a surreal dance. --- Additional effect: Knockback & Bind +-- Family: Orc +-- Description: Deals damage to nearby players with a surreal dance. Additional Effect: Bind, Knockback +-- Notes: Used by Seed Orc ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,14 +12,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.0 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_3) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BIND, 1, 0, 30) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIND, 1, 0, 30) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/phase_shift_1.lua b/scripts/actions/mobskills/phase_shift_1.lua index b09b0f4b8bc..39af1cbd98c 100644 --- a/scripts/actions/mobskills/phase_shift_1.lua +++ b/scripts/actions/mobskills/phase_shift_1.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Phase Shift --- A shockwave deals damage to targets in an area of effect. +-- Family: Exoplate +-- Description: A shockwave deals damage to targets in an area of effect. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3 -- fTP and fTP scaling unknown. TODO: capture ftp - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_2) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 -- TODO: Capture shadowBehavior + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/phase_shift_2.lua b/scripts/actions/mobskills/phase_shift_2.lua index fc367004c91..d74bbc69a69 100644 --- a/scripts/actions/mobskills/phase_shift_2.lua +++ b/scripts/actions/mobskills/phase_shift_2.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Phase Shift --- A shockwave deals damage to targets in an area of effect. Additional effect: Stun +-- Family: Exoplate +-- Description: A shockwave deals damage to targets in an area of effect. Additional Effect: Stun ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,17 +11,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 5 -- fTP and fTP scaling unknown. TODO: capture ftp - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_2) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 15) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 5.0, 5.0, 5.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 -- TODO: Capture shadowBehavior + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 15) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/phase_shift_3.lua b/scripts/actions/mobskills/phase_shift_3.lua index 6528d0a97d8..e82df22daa8 100644 --- a/scripts/actions/mobskills/phase_shift_3.lua +++ b/scripts/actions/mobskills/phase_shift_3.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Phase Shift --- A shockwave deals damage to targets in an area of effect. Additional effect: Stun + Bind +-- Family: Exoplate +-- Description: A shockwave deals damage to targets in an area of effect. Additional Effect: Bind, Stun ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,18 +11,27 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 7 -- fTP and fTP scaling unknown. TODO: capture ftp - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_2) - - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 15) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BIND, 1, 0, 30) - - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 7.0, 7.0, 7.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 -- TODO: Capture shadowBehavior + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 15) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIND, 1, 0, 30) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/pile_pitch.lua b/scripts/actions/mobskills/pile_pitch.lua index f76da3b0801..de634dc8132 100644 --- a/scripts/actions/mobskills/pile_pitch.lua +++ b/scripts/actions/mobskills/pile_pitch.lua @@ -13,20 +13,22 @@ end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) local params = {} - -- TODO: Jimmayus spreadsheet says this is a physical skill. Fix in mobPhysicalMove() pass. - params.baseDamage = target:getHP() * 0.90 -- TODO: Need captures of fTPs/damage. - params.fTP = { 1, 1, 1 } - params.element = xi.element.NONE - params.attackType = xi.attackType.MAGICAL - params.damageType = xi.damageType.NONE - params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS - params.skipDamageAdjustment = true - params.skipMagicBonusDiff = true - - local info = xi.mobskills.mobMagicalMove(mob, target, skill, action, params) + params.baseDamage = target:getHP() + params.numHits = 1 + params.fTP = { 0.90, 0.90, 0.90 } -- TODO: Capture % of current HP this does. + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS + params.skipFSTR = true + params.skipPDIF = true + params.skipParry = true -- TODO: Confirm this can't be parried, guarded or blocked. + params.skipGuard = true + params.skipBlock = true + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) if xi.mobskills.processDamage(mob, target, skill, action, info) then - target:takeDamage(info.damage, mob, xi.attackType.MAGICAL, xi.damageType.NONE, { breakBind = false }) + target:takeDamage(info.damage, mob, info.attackType, info.damageType, { breakBind = false }) xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIND, 1, 0, 30) mob:resetEnmity(target) -- TODO: Check hate reset type (Aggro pause vs full enmity reset.) diff --git a/scripts/actions/mobskills/pinecone_bomb.lua b/scripts/actions/mobskills/pinecone_bomb.lua index fc004959ee5..777994c1c44 100644 --- a/scripts/actions/mobskills/pinecone_bomb.lua +++ b/scripts/actions/mobskills/pinecone_bomb.lua @@ -1,8 +1,7 @@ ----------------------------------- -- Pinecone Bomb --- Description: Deals damage in a 15' area around target. Additional effect: Sleep. --- Type: Physical --- Range: 15' AoE around target +-- Family: Treant +-- Description: Deals damage to a target. Additional Effect: Sleep ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,16 +11,27 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.SLEEP_I, 1, 0, 60) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.skipParry = true + params.skipGuard = true + params.skipBlock = true - return dmg + local info = xi.mobskills.mobRangedMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.SLEEP_I, 1, 0, 60) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/pinecone_bomb_nm.lua b/scripts/actions/mobskills/pinecone_bomb_nm.lua index 7e3c35b4c5f..a49903eb46c 100644 --- a/scripts/actions/mobskills/pinecone_bomb_nm.lua +++ b/scripts/actions/mobskills/pinecone_bomb_nm.lua @@ -1,8 +1,7 @@ ----------------------------------- -- Pinecone Bomb +-- Family: Treant -- Description: Deals damage in a 15' area around target. --- Type: Physical --- Range: 15' AoE around target ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,14 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + params.skipParry = true + params.skipGuard = true + params.skipBlock = true + + local info = xi.mobskills.mobRangedMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/pinning_shot.lua b/scripts/actions/mobskills/pinning_shot.lua index dc638564190..3a653388bd6 100644 --- a/scripts/actions/mobskills/pinning_shot.lua +++ b/scripts/actions/mobskills/pinning_shot.lua @@ -1,11 +1,8 @@ ----------------------------------- --- Pinning Shot --- --- Description: Delivers a threefold ranged attack to targets in an area of effect. Additional effect: Bind --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows --- Range: Unknown --- Notes: Used only by Medusa. +-- Pinning Shot +-- Family: Lamia +-- Description: Delivers a threefold ranged attack to targets in an area of effect. Additional Effect: Bind +-- Notes: Used by Medusa. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,16 +12,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = math.random(2, 3) - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.RANGED, xi.damageType.PIERCING, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BIND, 1, 0, 60) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 -- TODO: Capture numHits + params.fTP = { 1.0, 1.0, 1.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 - target:takeDamage(dmg, mob, xi.attackType.RANGED, xi.damageType.PIERCING) - return dmg + -- TODO: Ranged or Physical? + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIND, 1, 0, 60) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/pirate_pummel.lua b/scripts/actions/mobskills/pirate_pummel.lua index 114102f058d..1ae785b3157 100755 --- a/scripts/actions/mobskills/pirate_pummel.lua +++ b/scripts/actions/mobskills/pirate_pummel.lua @@ -1,7 +1,7 @@ ----------------------------------- --- Pirate Pummel (Lion) --- Damage and burn effect --- Type: Physical +-- Pirate Pummel +-- Family: Humanoid (Lion) +-- Description: Deals damage to a target. Additional Effect: Burn -- Skillchain Properties: Fusion/Impaction ----------------------------------- ---@type TMobSkill @@ -12,18 +12,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - -- TODO: verify exact number of hits from this ability - local numhits = 2 - local accmod = 1 - local ftp = 0.3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, mob:getWeaponDmg() * ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) + local params = {} - xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BURN, 1, 0, 20) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 2 -- TODO: Capture numHits + params.fTP = { 0.3, 0.3, 0.3 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 -- TODO: Capture shadowBehavior - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BURN, 1, 0, 20) -- TODO: Capture power/duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/pit_ambush.lua b/scripts/actions/mobskills/pit_ambush.lua index 628766e0bce..ba3edac8579 100644 --- a/scripts/actions/mobskills/pit_ambush.lua +++ b/scripts/actions/mobskills/pit_ambush.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Pit Ambush --- Description: Only used by black antlions when they emerge to attack a player overhead. --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Pit Ambush +-- Family: Antlion +-- Description: Only used by black antlions when they emerge to attack a player above. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local ftp = 3.3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, 1, 1, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, xi.mobskills.shadowBehavior.WIPE_SHADOWS) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.3, 3.3, 3.3 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.WIPE_SHADOWS -- TODO: Capture shadowBehavior (With Utsusemi: San) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/plague_swipe.lua b/scripts/actions/mobskills/plague_swipe.lua index 3e8a87cb276..8e5755f69f3 100644 --- a/scripts/actions/mobskills/plague_swipe.lua +++ b/scripts/actions/mobskills/plague_swipe.lua @@ -1,16 +1,12 @@ ----------------------------------- --- Plague Swipe --- --- Description: Delivers a threefold attack in an cone effect behind user. Additional effect: Bio + Plague --- Type: Physical --- 2-3 Shadows --- Range: Backward Arc +-- Plague Swipe +-- Family: Khimaira +-- Description: Delivers a threefold attack in an cone effect behind user. Additional Effect: Bio, Plague ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - -- TODO: Replace this when there's a better method than isFacingTheSameDirection() aka isBehind if not target:isBehind(mob) then return 1 end @@ -19,18 +15,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 -- TODO: Capture numHits + params.fTP = { 1.0, 1.0, 1.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_4 - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BIO, 7, 3, 60) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.PLAGUE, 5, 3, 60) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + -- TODO: Capture effect powers/durations + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIO, 7, 3, 60, 0, 15) -- TODO: Capture subPower(ATTP modifier, using Bio II value for now) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PLAGUE, 5, 3, 60) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/poison_nails.lua b/scripts/actions/mobskills/poison_nails.lua index 57f9fae0ce7..a754f12c451 100644 --- a/scripts/actions/mobskills/poison_nails.lua +++ b/scripts/actions/mobskills/poison_nails.lua @@ -1,5 +1,7 @@ ----------------------------------- -- Poison Nails +-- Family: Avatar (Carbuncle) +-- Description: Deals physical damage to a target. Additional Effect: Poison ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -9,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, xi.mobskills.shadowBehavior.WIPE_SHADOWS) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.POISON, 1, 3, 60) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.POISON, 1, 3, 60) -- TODO: Capture effect power/duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/poison_pick.lua b/scripts/actions/mobskills/poison_pick.lua index ed25415b908..3661d808b99 100644 --- a/scripts/actions/mobskills/poison_pick.lua +++ b/scripts/actions/mobskills/poison_pick.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Poison Pick --- Description: Deals damage to a single target. Additional effect: poison --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Poison Pick +-- Family: Cockatrice +-- Description: Deals damage to a single target. Additional Effect: poison ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,17 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.0 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) - local power = mob:getMainLvl() / 5 + 3 + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.POISON, power, 3, 60) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + local power = math.floor(mob:getMainLvl() / 5) + 3 + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.POISON, power, 3, 60) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/poison_sting.lua b/scripts/actions/mobskills/poison_sting.lua index 2ac7a9c08a7..c8f9379d06a 100644 --- a/scripts/actions/mobskills/poison_sting.lua +++ b/scripts/actions/mobskills/poison_sting.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Poison Sting --- Deals Water damage to targets in a fan-shaped area of effect. Additional effect: Poison +-- Family: Scorpion +-- Description: Deals physical damage to a single target. Additional Effect: Poison ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,18 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - local power = math.floor(mob:getMainLvl() / 10) + 3 + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.POISON, power, 3, 60) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + local power = math.floor(mob:getMainLvl() / 10) + 3 + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.POISON, power, 3, 60) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/pole_swing.lua b/scripts/actions/mobskills/pole_swing.lua index 562e0e0058b..8ad7b9827e0 100644 --- a/scripts/actions/mobskills/pole_swing.lua +++ b/scripts/actions/mobskills/pole_swing.lua @@ -1,11 +1,8 @@ ----------------------------------- --- Pole Swing --- --- Description: Deals damage to a single target. --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee --- Notes: Used only by Lamia equipped with a staff. If they lost their staff, they'll use Hysteric Barrage instead. +-- Pole Swing +-- Family: Lamia +-- Description: Deals damage to a single target. +-- Notes: Used only by Lamia equipped with a staff. If they lost their staff, they'll use Hysteric Barrage instead. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,7 +10,7 @@ local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) if mob:getAnimationSub() ~= 1 and - (mob:getMainJob() == xi.job.SMN or mob:getMainJob() == xi.job.BLM) + (mob:getMainJob() == xi.job.SMN or mob:getMainJob() == xi.job.BLM) -- TODO: Set proper skill lists then return 0 else @@ -22,13 +19,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/potent_lunge.lua b/scripts/actions/mobskills/potent_lunge.lua index f72b4b096a2..f593c6cbda6 100644 --- a/scripts/actions/mobskills/potent_lunge.lua +++ b/scripts/actions/mobskills/potent_lunge.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Potent Lunge --- Description: Leaps at a single target. --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Potent Lunge +-- Family: Troll +-- Description: Deals physical damage to a single target. Additional Effect: Knockback ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -18,13 +16,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/pounce.lua b/scripts/actions/mobskills/pounce.lua index e9c44b4b89d..6e805a7ee6f 100644 --- a/scripts/actions/mobskills/pounce.lua +++ b/scripts/actions/mobskills/pounce.lua @@ -1,5 +1,7 @@ ----------------------------------- --- Pounce: Deals damage to a single target. +-- Pounce +-- Family: Coeurl +-- Description: Deals damage to a single target ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -9,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/powder_keg.lua b/scripts/actions/mobskills/powder_keg.lua index 9b1ac3f3161..ef8192093da 100755 --- a/scripts/actions/mobskills/powder_keg.lua +++ b/scripts/actions/mobskills/powder_keg.lua @@ -1,7 +1,7 @@ ----------------------------------- --- Powder Keg (Lion) --- Conal damage, knock back, defense down, and magic defense down. --- Type: Physical +-- Powder Keg +-- Family: Humanoid (Lion) +-- Description: Conal physical damage. Additional Effect: Defense Down, Knockback, Magic Defense Down -- Skillchain Properties: Fusion/Compression ----------------------------------- ---@type TMobSkill @@ -12,18 +12,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 2 - local ftp = 0.3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, mob:getWeaponDmg() * ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.DEFENSE_DOWN, 20, 0, 60) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.MAGIC_DEF_DOWN, 20, 0, 60) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 0.3, 0.3, 0.3 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + -- TODO: Capture power/durations + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.DEFENSE_DOWN, 20, 0, 60) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.MAGIC_DEF_DOWN, 20, 0, 60) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/power_attack.lua b/scripts/actions/mobskills/power_attack.lua index a2c49385e82..0f16ed5b34a 100644 --- a/scripts/actions/mobskills/power_attack.lua +++ b/scripts/actions/mobskills/power_attack.lua @@ -1,7 +1,8 @@ ----------------------------------- -- Power Attack +-- Family: Beetle -- Description : Deals physical damage to a single target - 100% Attack Boost --- Range: Melee +-- TODO: Currently used by jug pet beetle. Needs to be renamed ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,13 +12,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ATK_VARIES, 2.0, 2.0, 2.0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.HTH, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.HTH) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.HTH + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.attackMultiplier = { 2.0, 2.0, 2.0 } + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/power_attack_armed.lua b/scripts/actions/mobskills/power_attack_armed.lua index 3449b3a4148..1ec960f00fc 100644 --- a/scripts/actions/mobskills/power_attack_armed.lua +++ b/scripts/actions/mobskills/power_attack_armed.lua @@ -1,7 +1,7 @@ ----------------------------------- --- Power Attack +-- Power Attack (Armed with weapon) +-- Family: Gigas -- Description : Deals physical damage to a single target --- Range: Melee ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.HTH, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.HTH) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.HTH + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/power_attack_beetle.lua b/scripts/actions/mobskills/power_attack_beetle.lua index faeea86de85..0d09d35c018 100644 --- a/scripts/actions/mobskills/power_attack_beetle.lua +++ b/scripts/actions/mobskills/power_attack_beetle.lua @@ -1,7 +1,7 @@ ----------------------------------- -- Power Attack --- Deals damage based off TP. --- 100% TP: ??? / 250% TP: ??? / 300% TP: ??? +-- Family: Beetle +-- Description: Deals physical damage to a target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,13 +11,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ATK_VARIES, 1.2, 1.2, 1.2) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.HTH, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.HTH) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.HTH + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.attackMultiplier = { 2.0, 2.0, 2.0 } + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/power_attack_unarmed.lua b/scripts/actions/mobskills/power_attack_unarmed.lua index 3449b3a4148..27848d5f693 100644 --- a/scripts/actions/mobskills/power_attack_unarmed.lua +++ b/scripts/actions/mobskills/power_attack_unarmed.lua @@ -1,7 +1,7 @@ ----------------------------------- --- Power Attack +-- Power Attack (Unarmed Gigas) +-- Family: Gigas -- Description : Deals physical damage to a single target --- Range: Melee ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.HTH, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.HTH) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.HTH + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/power_slash.lua b/scripts/actions/mobskills/power_slash.lua index 27ccf0d8eda..52fdaf19dc6 100644 --- a/scripts/actions/mobskills/power_slash.lua +++ b/scripts/actions/mobskills/power_slash.lua @@ -1,10 +1,7 @@ ----------------------------------- --- Power slash --- --- Description: Delivers a powerful strike to a single target. --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Power slash +-- Family: Humanoid Great Sword Weaponskill +-- Description: Delivers a powerful strike to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/predator_claws.lua b/scripts/actions/mobskills/predator_claws.lua index 218dc08177c..1808762d435 100644 --- a/scripts/actions/mobskills/predator_claws.lua +++ b/scripts/actions/mobskills/predator_claws.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Predator Claws --- Delivers a threefold attack. +-- Family: Avatar (Garuda) +-- Description: Delivers a threefold attack. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,13 +11,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 2 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ACC_VARIES, 1, 2, 3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 + -- TODO: Possible accuracy modifier + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/primal_drill.lua b/scripts/actions/mobskills/primal_drill.lua index 3e91086a7a8..6a156644b07 100644 --- a/scripts/actions/mobskills/primal_drill.lua +++ b/scripts/actions/mobskills/primal_drill.lua @@ -1,11 +1,7 @@ ----------------------------------- --- Primal Drill --- --- Description: Drills into nearby targets with appendages. Additional effect: Bind --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows --- Range: Unknown radial --- Notes: +-- Primal Drill +-- Family: Yovra +-- Description: Drills into nearby targets with appendages. Additional Effect: Bind ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = math.random(2, 3) - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BIND, 1, 0, math.random(45, 90)) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 -- TODO: Capture numHits + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIND, 1, 0, math.random(45, 90)) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/punch.lua b/scripts/actions/mobskills/punch.lua index 0af433ee7ab..dc9611449c0 100644 --- a/scripts/actions/mobskills/punch.lua +++ b/scripts/actions/mobskills/punch.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Punch --- Ifrit delivers a single-hit blunt attack on target +-- Family: Avatar (Ifrit) +-- Description: Ifrit delivers a single-hit blunt attack on target ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 1, 2, 3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.5, 3.5, 3.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/quadrastrike.lua b/scripts/actions/mobskills/quadrastrike.lua index b8efa00a071..a461cbdc016 100644 --- a/scripts/actions/mobskills/quadrastrike.lua +++ b/scripts/actions/mobskills/quadrastrike.lua @@ -1,11 +1,16 @@ ----------------------------------- -- Quadrastrike +-- Family: Demon (Kindred) +-- Description: Delivers a fourfold attack to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - if mob:isMobType(xi.mobType.NOTORIOUS) or mob:isInDynamis() then + if + mob:isMobType(xi.mobType.NOTORIOUS) or -- TODO: Set proper skill lists + mob:isInDynamis() + then return 0 end @@ -13,13 +18,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 4 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ATK_VARIES, 1.2, 1.2, 1.2) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 4 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_4 + params.attackMultiplier = { 1.25, 1.25, 1.25 } + -- TODO: Possible accuracy modifer + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/quadratic_continuum.lua b/scripts/actions/mobskills/quadratic_continuum.lua index 1d6705574ed..4d7cd4d60d0 100644 --- a/scripts/actions/mobskills/quadratic_continuum.lua +++ b/scripts/actions/mobskills/quadratic_continuum.lua @@ -1,5 +1,7 @@ ----------------------------------- -- Quadratic Continuum +-- Family: Gorger +-- Description: Deals damage to a target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -9,13 +11,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 4 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ATK_VARIES, 0.8, 0.8, 0.8) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 4 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_4 + params.attackMultiplier = { 0.80, 0.80, 0.80 } + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/queasyshroom.lua b/scripts/actions/mobskills/queasyshroom.lua index 1a49d151c47..ca7b0a78224 100644 --- a/scripts/actions/mobskills/queasyshroom.lua +++ b/scripts/actions/mobskills/queasyshroom.lua @@ -1,12 +1,7 @@ ----------------------------------- -- Queasyshroom --- Additional effect: Poison. Duration of effect varies with TP. --- Range is 13.5 yalms. --- Piercing damage Ranged Attack. --- Secondary modifiers: INT: 20%. --- Additional Effect: Poison is based on level --- Poison effect may resist --- Removes all Shadow Images on the target. +-- Family: Funguar +-- Description: Deals physical damage to a single target. Additional Effect: Poison ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -20,19 +15,29 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + local power = mob:getMainLvl() / 10 + 1 + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.POISON, power, 3, 60) + end + skill:setFinalAnimationSub(1) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, xi.mobskills.shadowBehavior.WIPE_SHADOWS) - local power = mob:getMainLvl() / 10 + 1 - - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.POISON, power, 3, 60) - - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - return dmg + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/radiant_sacrament.lua b/scripts/actions/mobskills/radiant_sacrament.lua index 47bbac676d4..37afed24b71 100644 --- a/scripts/actions/mobskills/radiant_sacrament.lua +++ b/scripts/actions/mobskills/radiant_sacrament.lua @@ -1,13 +1,11 @@ ----------------------------------- -- Radiant Sacrament +-- Family: Avatar (Alexander) -- Description: Used at regular intervals as a ranged attack when target is out of melee range. --- Type: Physical --- Can be dispelled: N/A --- Utsusemi/Blink absorb: Wipes shadows -- Range: 20' maximum distance, unknown smaller radial (around target) --- Notes: Alexander generally uses this on targets out of his melee range. Accompanied by text --- "Offer thy worship... --- I shall burn away...thy transgressions..." +-- Notes: Alexander generally uses this on targets out of his melee range. Accompanied by text: +-- "Offer thy worship... +-- I shall burn away...thy transgressions..." ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -17,16 +15,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 5 - local ftp = 2 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.MAGIC_DEF_DOWN, 20, 0, 60) -- Needs adjusted to retail values for power/duration + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.WIPE_SHADOWS -- TODO: Capture shadowBehavior - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.MAGIC_DEF_DOWN, 20, 0, 60) -- TODO: Capture power/duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/raging_rush.lua b/scripts/actions/mobskills/raging_rush.lua index f7d771524a3..eef6c9b78a0 100644 --- a/scripts/actions/mobskills/raging_rush.lua +++ b/scripts/actions/mobskills/raging_rush.lua @@ -1,23 +1,35 @@ ----------------------------------- -- Raging Rush +-- Family: Humanoid Great Axe Weaponskill +-- Description: Delivers a threefold attack. ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - -- mob:messageBasic(xi.msg.basic.READIES_WS, 0, 41) + mob:messageBasic(xi.msg.basic.READIES_WS, 0, 86) + return 0 end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ACC_VARIES, 1, 2, 3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 + -- TODO: Possible accuracy modifier + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/ram_charge.lua b/scripts/actions/mobskills/ram_charge.lua index d2e3ac6ce91..31ffeb476dd 100644 --- a/scripts/actions/mobskills/ram_charge.lua +++ b/scripts/actions/mobskills/ram_charge.lua @@ -1,7 +1,7 @@ ----------------------------------- --- Ram Charge --- Description: Damage varies with TP. --- Type: Physical (Blunt) +-- Ram Charge +-- Family: Ram +-- Description: Deals physical damage to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/rampage.lua b/scripts/actions/mobskills/rampage.lua index 67be36ba7ae..9ab283a212d 100644 --- a/scripts/actions/mobskills/rampage.lua +++ b/scripts/actions/mobskills/rampage.lua @@ -1,10 +1,7 @@ ----------------------------------- --- Rampage --- --- Description: Delivers a five-hit attack. Chance of critical varies with TP. --- Type: Physical --- Number of hits --- Range: Melee +-- Rampage +-- Family: Humanoid Axe Weaponskill +-- Description: Delivers a five-hit attack. Chance of critical varies with TP. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,15 +12,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 5 - local accmod = 1 - local ftp = 1.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.CRIT_VARIES, 1, 1.5, 2) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - -- Witnessed 1100 to a DD. Going with it :D - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 5 + params.fTP = { 1.5, 1.5, 1.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_5 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/rampant_gnaw.lua b/scripts/actions/mobskills/rampant_gnaw.lua index 9a0061f2cbf..a39968ad846 100644 --- a/scripts/actions/mobskills/rampant_gnaw.lua +++ b/scripts/actions/mobskills/rampant_gnaw.lua @@ -1,7 +1,7 @@ ----------------------------------- -- Rampant Gnaw --- Deals damage to a single target. Additional effect: Paralysis --- Range: 10' cone +-- Family: Buffalo +-- Description: Deals damage to a single target. Additional Effect: Paralysis ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,17 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.4 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) + local params = {} - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.7, 1.7, 1.7 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.attackMultiplier = { 1.5, 1.5, 1.5 } - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.PARALYSIS, 20, 0, 120) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PARALYSIS, 20, 0, 120) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/rampant_stance.lua b/scripts/actions/mobskills/rampant_stance.lua index fb9bfa422bc..25867f773d7 100644 --- a/scripts/actions/mobskills/rampant_stance.lua +++ b/scripts/actions/mobskills/rampant_stance.lua @@ -1,7 +1,7 @@ ----------------------------------- -- Rampant Stance --- Physical area of effect damage that inflicts stun. --- Utsusemi/Blink absorb: 1-4 shadows, wipes Third Eye +-- Family: Monoceros +-- Description: Deals physical AoE damage to targets in range. Additional Effect: Stun -- Range: 7.0 (add 0.1-4 depending on terrain elevation) -- Notes: Takes roughly three seconds to charge the TP move up, enough time for anyone within range to easily back out and run back in directly after the animation begins. ----------------------------------- @@ -13,26 +13,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - -- parameters for AE - local typeEffect = xi.effect.STUN - local power = 1 - local duration = xi.mobskills.calculateDuration(3, 5) - - -- perform physical attack - local numhits = 3 - local accmod = 2 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - - -- if skill hit, apply dmg and AE - if not skill:hasMissMsg() then - target:takeDamage(dmg, mob, xi.attackType.RANGED, xi.damageType.BLUNT) - - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, typeEffect, power, 0, duration) + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 5) -- TODO: Capture stun duration end - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/randgrith.lua b/scripts/actions/mobskills/randgrith.lua index fcf939799c2..9cf7eb574b0 100644 --- a/scripts/actions/mobskills/randgrith.lua +++ b/scripts/actions/mobskills/randgrith.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Randgrith --- --- Description: Lowers target's evasion. Gullintani/Mjollnir: Temporarily improves accuracy. --- Type: Physical --- Range: Melee +-- Randgrith +-- Family: Humanoid Club Weaponskill +-- Description: Lowers target's evasion. Gullintani/Mjollnir: Temporarily improves accuracy. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,17 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.5 -- fTP and fTP scaling unknown. TODO: capture ftp + local params = {} - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.5, 2.5, 2.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.EVASION_DOWN, 32, 0, 60) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.EVASION_DOWN, 32, 0, 60) -- TODO: Capture power/duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/random_needles.lua b/scripts/actions/mobskills/random_needles.lua index ea5d296d1b4..68a32690bd7 100644 --- a/scripts/actions/mobskills/random_needles.lua +++ b/scripts/actions/mobskills/random_needles.lua @@ -1,8 +1,11 @@ ----------------------------------- -- ??? Needles +-- Family: Cactuar -- Description: Shoots multiple needles at enemies within range. --- 'The Amigo Sabotender's special ability 1000 Needles has been renamed ??? Needles.'' --- https://forum.square-enix.com/ffxi/threads/46068-Feb-19-2015-(JST)-Version-Update +-- Notes: The Amigo Sabotender's special ability 1000 Needles has been renamed ??? Needles. +-- https://forum.square-enix.com/ffxi/threads/46068-Feb-19-2015-(JST)-Version-Update +-- from http://ffxiclopedia.wikia.com/wiki/%3F%3F%3F_Needles +-- "Seen totals ranging from 15, 000 to 55, 000 needles." ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,31 +15,28 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - -- from http://ffxiclopedia.wikia.com/wiki/%3F%3F%3F_Needles - -- "Seen totals ranging from 15, 000 to 55, 000 needles." + local params = {} + + params.baseDamage = math.random(1000, 10000) / skill:getTotalTargets() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.WIPE_SHADOWS + params.guaranteedFirstHit = true + params.skipPDIF = true + if mob:getID() == zones[xi.zone.ABYSSEA_ALTEPA].mob.CUIJATENDER then - local needles = math.random(15000, 55000) / skill:getTotalTargets() - local info = - { - damage = needles - } - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.LIGHT, xi.mobskills.shadowBehavior.WIPE_SHADOWS) - - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.LIGHT) - - return dmg - else - local needles = math.random(1000, 10000) / skill:getTotalTargets() - local info = - { - damage = needles - } - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.LIGHT, xi.mobskills.shadowBehavior.WIPE_SHADOWS) - - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.LIGHT) - - return dmg + params.baseDamage = math.random(15000, 55000) / skill:getTotalTargets() + end + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/ranged_attack.lua b/scripts/actions/mobskills/ranged_attack.lua index 7aacee85efe..74246e6cbf5 100644 --- a/scripts/actions/mobskills/ranged_attack.lua +++ b/scripts/actions/mobskills/ranged_attack.lua @@ -1,6 +1,10 @@ ----------------------------------- -- Ranged Attack --- Deals a ranged attack to a single target. +-- Family: Humanoid/Beastman (Varies) +-- Description: Deals a ranged attack to a single target. +-- Note: Used by RNG and NIN mobs as their ranged attack. +-- Gigas have their own ranged attack skill called "Catapult" +-- Trolls have their own ranged attack skill called "Zarraqa" ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,37 +14,31 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local dmgmod = 1.5 - local params = { canCrit = true } - - local info = xi.mobskills.mobRangedMove(mob, target, skill, numhits, accmod, dmgmod, xi.mobskills.magicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.RANGED, xi.damageType.PIERCING, info.hitslanded) - - if - skill:getMsg() ~= xi.msg.basic.SHADOW_ABSORB and - skill:getMsg() ~= xi.msg.basic.ANTICIPATE - then - if info.hitslanded > 0 then - if info.isCritical then - skill:setMsg(xi.msg.basic.RANGED_ATTACK_CRIT) - else - skill:setMsg(xi.msg.basic.RANGED_ATTACK_HIT) - end - - if dmg > 0 then - target:addTP(20) - mob:addTP(80) - end - else - skill:setMsg(xi.msg.basic.RANGED_ATTACK_MISS) - end - - target:takeDamage(dmg, mob, xi.attackType.RANGED, xi.damageType.PIERCING) + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } -- TODO: Mobs get more base damage on their ranged weapon slot already. Do we need the 1.5 fTP? + params.attackType = xi.attackType.RANGED + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.skipParry = true + params.skipGuard = true + params.skipBlock = true + + -- Note: Normal mob ranged attacks that call this script can not critical hit. + -- Normal mobskill style ranged attacks do not display sweet spot messaging. + + -- TODO: Fomor type mobs that should use the player style ranged attacks are currently use this script. + -- Their ranged attacks can crit. + + local info = xi.mobskills.mobRangedMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) end - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/razor_fang.lua b/scripts/actions/mobskills/razor_fang.lua index bbf23572ec9..4030ea4bd08 100644 --- a/scripts/actions/mobskills/razor_fang.lua +++ b/scripts/actions/mobskills/razor_fang.lua @@ -1,8 +1,7 @@ ----------------------------------- --- Razor Fang --- Description: Deals 300% base damage to a single target. --- Type: Physical --- Range: Melee +-- Razor Fang +-- Family: Tiger +-- Description: Deals 300% base damage to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/reactor_overload.lua b/scripts/actions/mobskills/reactor_overload.lua index 1618aae7787..bd3f67675f9 100644 --- a/scripts/actions/mobskills/reactor_overload.lua +++ b/scripts/actions/mobskills/reactor_overload.lua @@ -25,7 +25,7 @@ mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) if xi.mobskills.processDamage(mob, target, skill, action, info) then target:takeDamage(info.damage, mob, info.attackType, info.damageType) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.SILENCE, 1, 0, math.random(15, 60)) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.SILENCE, 1, 0, math.random(15, 60)) end return info.damage diff --git a/scripts/actions/mobskills/recoil_dive.lua b/scripts/actions/mobskills/recoil_dive.lua index 5f871392e6b..72347dc7854 100644 --- a/scripts/actions/mobskills/recoil_dive.lua +++ b/scripts/actions/mobskills/recoil_dive.lua @@ -1,5 +1,7 @@ ----------------------------------- -- Recoil Dive +-- Family: Pugil (Jagil) +-- Description: Deals conal AoE physical damage to targets in front of mob ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -9,13 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.CRIT_VARIES, 1, 2, 3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/rhino_attack.lua b/scripts/actions/mobskills/rhino_attack.lua index 72ea865daab..2ab77644fda 100644 --- a/scripts/actions/mobskills/rhino_attack.lua +++ b/scripts/actions/mobskills/rhino_attack.lua @@ -1,7 +1,7 @@ ----------------------------------- -- Rhino_Attack --- Deals damage to a single target. Additional effect: Knockback --- Utsusemi/Blink absorb: 1 shadow +-- Family: Beetle +-- Description: Deals damage to a single target. Additional Effect: Knockback ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,15 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - -- KNOCKBACK + local params = {} - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ATK_VARIES, 2.0, 2.0, 2.0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.attackMultiplier = { 2.0, 2.0, 2.0 } + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/rhinowrecker.lua b/scripts/actions/mobskills/rhinowrecker.lua index 479b24b8600..e8ad7e2b72a 100644 --- a/scripts/actions/mobskills/rhinowrecker.lua +++ b/scripts/actions/mobskills/rhinowrecker.lua @@ -1,5 +1,6 @@ ----------------------------------- -- Rhinowrecker +-- Family: Beetle -- Description : Powerful physical attack to enemies in a cone. Additional Effect: Defense Down, Knockback -- Range: Cone originating from caster. -- TODO: Verify animation ID, skill is currently commented out in mob_skills.sql @@ -13,17 +14,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3 - local power = 25 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.HTH, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.DEFENSE_DOWN, power, 0, 180) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.HTH) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + -- TODO: DEF Down power varies depending on mob + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.DEFENSE_DOWN, 25, 0, 180) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/ripper_fang.lua b/scripts/actions/mobskills/ripper_fang.lua index 5f7f8a51790..cd6a82cbfdc 100644 --- a/scripts/actions/mobskills/ripper_fang.lua +++ b/scripts/actions/mobskills/ripper_fang.lua @@ -1,7 +1,7 @@ ----------------------------------- --- Ripper Fang --- Description: Deals physical damage. Damage varies with TP. --- Type: Physical (Slashing) +-- Ripper Fang +-- Family: Raptor +-- Description: Deals physical damage to a target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,15 +11,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ATK_VARIES, 1.3, 1.3, 1.3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.attackMultiplier = { 1.3, 1.3, 1.3 } - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/rock_smash.lua b/scripts/actions/mobskills/rock_smash.lua index 45100ae4245..f14fa04baff 100644 --- a/scripts/actions/mobskills/rock_smash.lua +++ b/scripts/actions/mobskills/rock_smash.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Rock Smash --- Description: Damages a single target. Additional effect: Petrification --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Rock Smash +-- Family: Troll +-- Description: Damages a single target. Additional Effect: Petrification ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -18,17 +16,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 2 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - local power = math.random(25, 40) + mob:getMainLvl() / 3 + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.PETRIFICATION, 1, 0, power) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PETRIFICATION, 1, 0, 45) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/rock_throw.lua b/scripts/actions/mobskills/rock_throw.lua index 9d6776df4dd..0d964f43b70 100644 --- a/scripts/actions/mobskills/rock_throw.lua +++ b/scripts/actions/mobskills/rock_throw.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Rock Throw --- Titan delivers a single-hit slashing attack on target +-- Family: Avatar (Titan) +-- Description: Titan delivers a single-hit slashing attack on target ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,13 +11,27 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 1, 2, 3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.5, 3.5, 3.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.RANGED + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.skipParry = true + params.skipGuard = true + params.skipBlock = true + + local info = xi.mobskills.mobRangedMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.SLOW, 3000, 3, 120) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/roller_chain.lua b/scripts/actions/mobskills/roller_chain.lua index 8722683f2b3..a188c1a7b44 100644 --- a/scripts/actions/mobskills/roller_chain.lua +++ b/scripts/actions/mobskills/roller_chain.lua @@ -1,7 +1,7 @@ ----------------------------------- -- Roller Chain -- Family: Ramparts --- Description: Deals Physical damage to a target. Additional Effect: Bind. +-- Description: Deals physical damage to a target. Additional Effect: Bind -- Notes: Only used by Ramparts when its door is closed. ----------------------------------- @@ -19,15 +19,14 @@ end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) local params = {} - -- TODO: This is a physical skill. Will revisit in mobPhysicalMove() PR params.baseDamage = mob:getWeaponDmg() - params.fTP = { 2, 2, 2 } -- TODO: Capture fTPs - params.element = xi.element.DARK - params.attackType = xi.attackType.MAGICAL - params.damageType = xi.damageType.DARK + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS - local info = xi.mobskills.mobMagicalMove(mob, target, skill, action, params) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) if xi.mobskills.processDamage(mob, target, skill, action, info) then target:takeDamage(info.damage, mob, info.attackType, info.damageType) diff --git a/scripts/actions/mobskills/royal_bash.lua b/scripts/actions/mobskills/royal_bash.lua index 36298dd81fe..b91da753d47 100644 --- a/scripts/actions/mobskills/royal_bash.lua +++ b/scripts/actions/mobskills/royal_bash.lua @@ -1,5 +1,7 @@ ----------------------------------- -- Royal Bash +-- Family: Humanoid (Trion) +-- Description: Delivers a shield bash to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -9,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.2 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 4) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.2, 1.2, 1.2 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) -- TODO: Capture stun duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/rush.lua b/scripts/actions/mobskills/rush.lua index df93d262136..17de39abd3f 100644 --- a/scripts/actions/mobskills/rush.lua +++ b/scripts/actions/mobskills/rush.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Rush --- Shiva delivers a five-hit attack to target. +-- Family: Avatar (Shiva) +-- Description: Shiva delivers a five-hit attack to target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,13 +11,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 5 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 1, 2, 3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 5 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_5 + -- TODO: Possible accuracy modifier + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/rushing_drub.lua b/scripts/actions/mobskills/rushing_drub.lua index 71e0b753db8..0d12ac0b2be 100644 --- a/scripts/actions/mobskills/rushing_drub.lua +++ b/scripts/actions/mobskills/rushing_drub.lua @@ -1,11 +1,8 @@ ----------------------------------- --- Rushing Drub --- --- Description: Delivers a fourfold attack on a single target. --- Type: Physical --- Utsusemi/Blink absorb: 4 shadows --- Range: Melee --- Notes: Only used by Mamool Ja with staves. +-- Rushing Drub +-- Family: Mamool Ja +-- Description: Delivers a fourfold attack on a single target. +-- Notes: Only used by Mamool Ja with staves. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,7 +10,7 @@ local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) if mob:getAnimationSub() == 0 and - (mob:getMainJob() == xi.job.BLM or mob:getMainJob() == xi.job.WHM) + (mob:getMainJob() == xi.job.BLM or mob:getMainJob() == xi.job.WHM) -- TODO: Set proper skill lists then return 0 end @@ -22,13 +19,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 4 - local accmod = 1 - local ftp = 0.75 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 4 + params.fTP = { 0.75, 0.75, 0.75 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_4 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/rushing_slash.lua b/scripts/actions/mobskills/rushing_slash.lua index 3307c5fb6ef..34d2a33938e 100644 --- a/scripts/actions/mobskills/rushing_slash.lua +++ b/scripts/actions/mobskills/rushing_slash.lua @@ -1,17 +1,14 @@ ----------------------------------- --- Rushing Slash --- --- Description: Delivers a fourfold attack on a single target. --- Type: Physical --- Utsusemi/Blink absorb: 4 shadows --- Range: Melee --- Notes: Only used by Mamool Ja with slashing weapons. +-- Rushing Slash +-- Family: Manool Ja +-- Description: Delivers a fourfold attack on a single target. +-- Notes: Only used by Mamool Ja with slashing weapons. ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - if mob:getAnimationSub() == 0 and mob:getMainJob() == xi.job.BST then + if mob:getAnimationSub() == 0 and mob:getMainJob() == xi.job.BST then -- TODO: Set proper skill lists return 0 end @@ -19,13 +16,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 4 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 4 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_4 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/rushing_stab.lua b/scripts/actions/mobskills/rushing_stab.lua index d12d6f99456..987550f04bf 100644 --- a/scripts/actions/mobskills/rushing_stab.lua +++ b/scripts/actions/mobskills/rushing_stab.lua @@ -1,17 +1,14 @@ ----------------------------------- --- Rushing Stab --- --- Description: Delivers a fourfold attack on a single target. --- Type: Physical --- Utsusemi/Blink absorb: 4 shadows --- Range: Melee --- Notes: Only used by Mamool Ja with piercing weapons. +-- Rushing Stab +-- Family: Mamool Ja +-- Description: Delivers a fourfold attack on a single target. +-- Notes: Only used by Mamool Ja with piercing weapons. ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - if mob:getAnimationSub() == 0 and mob:getMainJob() == xi.job.DRG then + if mob:getAnimationSub() == 0 and mob:getMainJob() == xi.job.DRG then -- TODO: Set proper skill lists return 0 end @@ -19,13 +16,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 4 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 4 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_4 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/sand_trap.lua b/scripts/actions/mobskills/sand_trap.lua index d45bf9d2b7e..a1919d2623f 100644 --- a/scripts/actions/mobskills/sand_trap.lua +++ b/scripts/actions/mobskills/sand_trap.lua @@ -1,9 +1,7 @@ ----------------------------------- -- Sand Trap --- Description: AOE Petrify and resets hate. --- Type: Physical --- Utsusemi/Blink absorb: Ignore --- Range: 15' radial +-- Family: Antica +-- Description: Deals physical damage to targets in range. Additional Effect: Petrification ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,20 +11,27 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 0.5, 0.5, 0.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS - xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PETRIFICATION, 1, 0, 15) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - -- set everyone's enmity inactive - mob:setEnmityActive(target, false) + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) - return dmg + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PETRIFICATION, 1, 0, 15) + + -- Set everyone's enmity inactive (Not a full hate reset) + mob:setEnmityActive(target, false) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/saucepan.lua b/scripts/actions/mobskills/saucepan.lua index 356df1d4031..9433ebbb6dd 100644 --- a/scripts/actions/mobskills/saucepan.lua +++ b/scripts/actions/mobskills/saucepan.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Saucepan --- Force feeds an unsavory dish. +-- Family: Goblin +-- Description: Force feeds an unsavory dish. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,18 +11,28 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 0.8 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - if target:hasStatusEffect(xi.effect.FOOD) then - target:delStatusEffectSilent(xi.effect.FOOD) + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 0.8, 0.8, 0.8 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + if target:hasStatusEffect(xi.effect.FOOD) then + target:delStatusEffectSilent(xi.effect.FOOD) + end + + target:addStatusEffect(xi.effect.FOOD, { power = 255, duration = 1800, origin = mob, sourceType = xi.effectSourceType.FOOD }) end - target:addStatusEffect(xi.effect.FOOD, { power = 255, duration = 1800, origin = mob, sourceType = xi.effectSourceType.FOOD }) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/savage_blade.lua b/scripts/actions/mobskills/savage_blade.lua index 84774c2f877..f19fd6ea901 100644 --- a/scripts/actions/mobskills/savage_blade.lua +++ b/scripts/actions/mobskills/savage_blade.lua @@ -1,16 +1,13 @@ ----------------------------------- -- Savage Blade --- +-- Family: Humanoid Sword Weaponskill -- Description: Delivers a twofold attack. Damage varies with TP. --- Type: Physical --- Utsusemi/Blink absorb: Shadow per hit --- Range: Melee ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - if mob:getPool() ~= xi.mobPool.QUBIA_ARENA_TRION then + if mob:getPool() ~= xi.mobPool.QUBIA_ARENA_TRION then -- TODO: Should this be limited to Trion? mob:messageBasic(xi.msg.basic.READIES_WS, 0, 42) end @@ -18,19 +15,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + if mob:getPool() == xi.mobPool.QUBIA_ARENA_TRION then -- Trion@QuBia_Arena only target:showText(mob, zones[xi.zone.QUBIA_ARENA].text.SAVAGE_LAND) end - local numhits = 2 - local accmod = 1 - local ftp = 2.0 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - - -- AA EV: Approx 900 damage to 75 DRG/35 THF. 400 to a NIN/WAR in Arhat, but took shadows. - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/scission_thrust.lua b/scripts/actions/mobskills/scission_thrust.lua index 0e7c8bbd6f7..e0d70f9ecab 100644 --- a/scripts/actions/mobskills/scission_thrust.lua +++ b/scripts/actions/mobskills/scission_thrust.lua @@ -1,16 +1,13 @@ ----------------------------------- --- Tremorous Tread --- --- Description: Deals damage in a fan-shaped area of effect. --- Type: Physical --- 2-3 Shadows --- Range: Unknown +-- Scission Thrust +-- Family: Mammet +-- Description: Deals damage in a fan-shaped area of effect. ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - if mob:getAnimationSub() == 1 then + if mob:getAnimationSub() == 1 then -- Used in sword form return 0 end @@ -18,15 +15,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_2) - - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/scorching_lash.lua b/scripts/actions/mobskills/scorching_lash.lua index ae4f6f13425..0bf86ce89d3 100644 --- a/scripts/actions/mobskills/scorching_lash.lua +++ b/scripts/actions/mobskills/scorching_lash.lua @@ -1,11 +1,9 @@ ----------------------------------- --- Scorching Lash --- --- Description: Deals heavy damage to targets behind user. --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows --- Range: Back --- Notes: Used only if a target with hate is behind them. Conal behind Cerberus. +-- Scorching Lash +-- Family: Cerberus +-- Description: Deals heavy damage to targets behind user. +-- Notes: Used only if a target with hate is behind them. +-- Despite the fire animation, this is a physical skin. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -19,13 +17,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 1.3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 -- TODO: Capture numHits + params.fTP = { 1.3, 1.3, 1.3 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_4 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/scourge.lua b/scripts/actions/mobskills/scourge.lua index 628c12169ab..4cfbad84cf4 100644 --- a/scripts/actions/mobskills/scourge.lua +++ b/scripts/actions/mobskills/scourge.lua @@ -1,8 +1,7 @@ ----------------------------------- --- Scourge --- Description: Ragnarok/Valhalla: Temporarily improves critical hit rate. --- Type: Physical --- Range: Melee +-- Scourge +-- Family: Humanoid Great Sword Weaponskill +-- Description: Ragnarok/Valhalla: Temporarily improves critical hit rate. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,15 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.5 -- fTP and fTP scaling unknown. TODO: capture ftp + local params = {} - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.5, 2.5, 2.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/screwdriver.lua b/scripts/actions/mobskills/screwdriver.lua index a1df3394a30..a3354b46504 100644 --- a/scripts/actions/mobskills/screwdriver.lua +++ b/scripts/actions/mobskills/screwdriver.lua @@ -1,7 +1,7 @@ ----------------------------------- -- Screwdriver --- Deals critical damage. Chance of critical hit varies with TP. --- 100% TP: ??? / 200% TP: ??? / 300% TP: ??? +-- Family: Pugil +-- Description: Deals critical damage. Chance of critical hit varies with TP. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,13 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = math.random(2, 3) - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.CRIT_VARIES, 1, 2, 3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/scythe_tail.lua b/scripts/actions/mobskills/scythe_tail.lua index e2589b542d4..43134059d23 100644 --- a/scripts/actions/mobskills/scythe_tail.lua +++ b/scripts/actions/mobskills/scythe_tail.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Scythe Tail --- Description: Deals damage to a single target. Additional effect: Knockback --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Scythe Tail +-- Family: Raptor +-- Description: Deals damage to a single target. Additional Effect: Knockback, Stun ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,14 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) -- TODO: Capture stun duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/seedspray.lua b/scripts/actions/mobskills/seedspray.lua index f1d18a51917..279f3722010 100644 --- a/scripts/actions/mobskills/seedspray.lua +++ b/scripts/actions/mobskills/seedspray.lua @@ -1,10 +1,7 @@ ----------------------------------- -- Seedspray -- Family: Rafflesia --- Description: Single-target damage and Defense Down. --- Type: Physical --- Utsusemi/Blink absorb: Absorbed by 3 shadows. --- Range: 11.5 yalms +-- Description: Single-target damage. Additional Effect: Defense Down. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,17 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 1, 1.5, 2) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_3) + local params = {} - xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.DEFENSE_DOWN, 8, 0, 120) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + -- TODO: Possible accuracy modifier - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.DEFENSE_DOWN, 33, 0, 60) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/seismic_tail.lua b/scripts/actions/mobskills/seismic_tail.lua index c6b97666e07..31857abe22b 100644 --- a/scripts/actions/mobskills/seismic_tail.lua +++ b/scripts/actions/mobskills/seismic_tail.lua @@ -1,9 +1,7 @@ ----------------------------------- -- Seismic Tail +-- Family: Orobon -- Description: Crushes targets in an area of effect with its tail. --- Type: Physical --- Utsusemi/Blink absorb: 3 shadows --- Range: 15' radial ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,12 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, 1, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/seismostomp.lua b/scripts/actions/mobskills/seismostomp.lua index c0e0e485409..27f6d1ad50f 100644 --- a/scripts/actions/mobskills/seismostomp.lua +++ b/scripts/actions/mobskills/seismostomp.lua @@ -1,7 +1,7 @@ ----------------------------------- --- Seismostomp --- Description: Damage varies with TP. Additional effect: "Stun." --- Type: Physical (Blunt) +-- Seismostomp +-- Family: Dynamis Statue +-- Description: Damage varies with TP. Additional Effect: Stun ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,22 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.3 + local params = {} - if mob:isMobType(xi.mobType.NOTORIOUS) then - ftp = ftp + math.random() - end + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local shadowsRemoved = math.random(1, 2) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, shadowsRemoved) + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 4) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) + end - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/serpentine_tail.lua b/scripts/actions/mobskills/serpentine_tail.lua index 538c1c17450..701e30fa03b 100644 --- a/scripts/actions/mobskills/serpentine_tail.lua +++ b/scripts/actions/mobskills/serpentine_tail.lua @@ -1,10 +1,7 @@ ----------------------------------- --- Serpentine Tail --- --- Description: Deals heavy damage to a target behind the user. --- Type: Physical --- 2-3 Shadows --- Range: Back +-- Serpentine Tail +-- Family: Hydra +-- Description: Deals heavy damage to a target behind the user. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,14 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 4.25 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_3) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 4.25, 4.25, 4.25 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/severing_fang.lua b/scripts/actions/mobskills/severing_fang.lua index d54e6f41459..1cbb4017176 100644 --- a/scripts/actions/mobskills/severing_fang.lua +++ b/scripts/actions/mobskills/severing_fang.lua @@ -1,10 +1,7 @@ ----------------------------------- --- Severing Fang --- --- Description: Bites at all targets in front. Additional effect: Defense Down --- Type: Physical --- Utsusemi/Blink absorb: 2 shadows --- Range: Front arc (cone) +-- Severing Fang +-- Family: Ruszor +-- Description: Bites at all targets in front. Additional Effect: Defense Down ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -20,16 +17,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 2 - local accmod = 1 - local ftp = 1.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.DEFENSE_DOWN, 30, 0, 60) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 -- TODO: Capture numHits + params.fTP = { 2.5, 2.5, 2.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.DEFENSE_DOWN, 50, 0, 90) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/shackled_fists.lua b/scripts/actions/mobskills/shackled_fists.lua index 383f33d28fe..9b17846b178 100644 --- a/scripts/actions/mobskills/shackled_fists.lua +++ b/scripts/actions/mobskills/shackled_fists.lua @@ -1,11 +1,13 @@ ----------------------------------- -- Shackled Fists +-- Family: Fomor +-- Description: Delivers a fivefold attack. ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - if mob:getMainJob() == xi.job.MNK then + if mob:getMainJob() == xi.job.MNK then -- TODO: Set proper skill lists return 0 end @@ -13,13 +15,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 5 - local accmod = 1 - local ftp = 0.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.HTH, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.HTH) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 5 + params.fTP = { 0.5, 0.5, 0.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.HTH + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_5 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/shadow_claw.lua b/scripts/actions/mobskills/shadow_claw.lua index 4ba0aa5b56b..b3720e3eed0 100644 --- a/scripts/actions/mobskills/shadow_claw.lua +++ b/scripts/actions/mobskills/shadow_claw.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Shadow Claw --- Deals damage to a single target. Additional effect: Blindness +-- Family: Hounds +-- Description: Deals damage to a single target. Additional Effect: Blindness ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BLINDNESS, 30, 0, 30) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BLINDNESS, 30, 0, 30) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/shadow_thrust.lua b/scripts/actions/mobskills/shadow_thrust.lua index 96c1adc3df3..ce69f2ae575 100644 --- a/scripts/actions/mobskills/shadow_thrust.lua +++ b/scripts/actions/mobskills/shadow_thrust.lua @@ -1,11 +1,8 @@ ----------------------------------- --- Shadow Thrust --- --- Description: Deals damage to a single target. --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee --- Notes: Used only by Medusa. +-- Shadow Thrust +-- Family: Lamia (Medusa) +-- Description: Deals damage to a single target. +-- Notes: Used by Medusa. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,13 +12,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/shadowstitch.lua b/scripts/actions/mobskills/shadowstitch.lua index ff76d0beded..3b3d02360e4 100644 --- a/scripts/actions/mobskills/shadowstitch.lua +++ b/scripts/actions/mobskills/shadowstitch.lua @@ -1,8 +1,7 @@ ----------------------------------- -- Shadowstitch --- Binds target. --- Type: Physical --- Range: Melee +-- Family: Humanoid Dagger Weaponskill +-- Description: Deals physical damage to a target. Additional Effect: Bind ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,17 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BIND, 1, 0, 15) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIND, 1, 0, 15) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/shakeshroom.lua b/scripts/actions/mobskills/shakeshroom.lua index d7fcee3ea73..f850fff96fc 100644 --- a/scripts/actions/mobskills/shakeshroom.lua +++ b/scripts/actions/mobskills/shakeshroom.lua @@ -1,9 +1,7 @@ ----------------------------------- -- Shakeshroom --- Additional effect: Fires a mushroom cap, dealing damage to a single target. Additional effect: disease --- Range is 14.7 yalms. --- Piercing damage Ranged Attack. --- Secondary modifiers: INT: 20%. +-- Family: Funguar +-- Description: Deal physical damage to a a single target. Additional Effect: Disease ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -17,18 +15,28 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - skill:setFinalAnimationSub(3) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.DISEASE, 1, 0, 720) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.DISEASE, 1, 0, 720) + end + + skill:setFinalAnimationSub(3) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/shark_bite.lua b/scripts/actions/mobskills/shark_bite.lua index 0b53eb235e0..d93d3d9d270 100644 --- a/scripts/actions/mobskills/shark_bite.lua +++ b/scripts/actions/mobskills/shark_bite.lua @@ -1,8 +1,7 @@ ----------------------------------- -- Shark Bite --- Delivers a twofold attack --- Type: Physical --- Range: Melee +-- Family: Humanoid Dagger Weaponskill +-- Description: Delivers a twofold attack. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,15 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 2 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ATK_VARIES, 1, 1, 1) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 2 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/sharp_sting.lua b/scripts/actions/mobskills/sharp_sting.lua index 2e5886a4606..4111216dd1d 100644 --- a/scripts/actions/mobskills/sharp_sting.lua +++ b/scripts/actions/mobskills/sharp_sting.lua @@ -1,11 +1,7 @@ ----------------------------------- --- Sharp Sting --- --- Description: Deals high damage to target in a ranged attack. --- Type: Ranged --- Utsusemi/Blink absorb: 1 shadow --- Range: 10' single --- Notes: Appears to be very inaccurate. +-- Sharp Sting +-- Family: Bee +-- Description: Delivers a ranged attack to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,13 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 0.7 - local dmgmod = 2.5 - local info = xi.mobskills.mobRangedMove(mob, target, skill, numhits, accmod, dmgmod, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.RANGED, xi.damageType.PIERCING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.RANGED, xi.damageType.PIERCING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.skipParry = true + params.skipGuard = true + params.skipBlock = true + + local info = xi.mobskills.mobRangedMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/sheep_charge.lua b/scripts/actions/mobskills/sheep_charge.lua index d801d6931a2..caf7f2ba8d6 100644 --- a/scripts/actions/mobskills/sheep_charge.lua +++ b/scripts/actions/mobskills/sheep_charge.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Sheep Charge --- Deals damage to a single target. Additional effect: Knockback +-- Family: Sheep +-- Description: Deals damage to a single target. Additional Effect: Knockback ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/sheep_charge_melee.lua b/scripts/actions/mobskills/sheep_charge_melee.lua index 9fff854af14..59a52bcfa0b 100644 --- a/scripts/actions/mobskills/sheep_charge_melee.lua +++ b/scripts/actions/mobskills/sheep_charge_melee.lua @@ -1,7 +1,8 @@ ----------------------------------- -- Sheep Charge Melee --- Deals damage to a single target. Additional effect: Knockback --- Used in BCNM: Hostile Herbivores +-- Family: Shhep +-- Description: Deals damage to a single target. Additional Effect: Knockback +-- Used in BCNM: Hostile Herbivores in place of regular auto attacks. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,13 +12,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/shell_bash.lua b/scripts/actions/mobskills/shell_bash.lua index 99defe1079c..ee35e6b07c6 100644 --- a/scripts/actions/mobskills/shell_bash.lua +++ b/scripts/actions/mobskills/shell_bash.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Shell Bash --- Deals damage. Additional effect: Stun +-- Family: Quadav +-- Description: Deals damage to a single target. Additional Effect: Stun ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 4) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/shibaraku.lua b/scripts/actions/mobskills/shibaraku.lua index d0d45d0cc38..7250787bf3c 100644 --- a/scripts/actions/mobskills/shibaraku.lua +++ b/scripts/actions/mobskills/shibaraku.lua @@ -1,9 +1,7 @@ ----------------------------------- -- Shibaraku --- Description: Damages enemies in an area of effect. Additional effect: Stun + Knockback --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows --- Range: 10' radial +-- Family: Yagudo +-- Description: Damages enemies in an area of effect. Additional Effect: Knockback, Stun ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,16 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_3) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 4) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.2, 2.2, 2.2 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + -- TODO: Knockback values - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/shield_bash.lua b/scripts/actions/mobskills/shield_bash.lua index ce0a9085104..8b57d8319f5 100644 --- a/scripts/actions/mobskills/shield_bash.lua +++ b/scripts/actions/mobskills/shield_bash.lua @@ -1,8 +1,7 @@ ----------------------------------- --- Shield Bash --- Description: Delivers an attack that can stun the target. Shield required. --- Type: Physical --- Range: Melee +-- Shield Bash +-- Family: Humanoid / Animated Weapon +-- Description: Delivers a physical attack to a single target. Additional Effect: Stun ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,17 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 8 -- fTP and fTP scaling unknown. TODO: capture ftp + local params = {} - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture shadowBehavior + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 7) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 7) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/shield_strike.lua b/scripts/actions/mobskills/shield_strike.lua index 4bcd0bd6dcf..7d3de83eaa9 100644 --- a/scripts/actions/mobskills/shield_strike.lua +++ b/scripts/actions/mobskills/shield_strike.lua @@ -1,10 +1,7 @@ ----------------------------------- --- Shield Strike --- --- Description: Attempts to Shield Bash players. Additional effect: Stun --- Type: Physical --- 1 shadow? --- Range: Melee front arc +-- Shield Strike +-- Family: Humanoid (Ark Angel EV) +-- Description: Deals conal AoE physical damage to targets in front of mob. Additional Effect: Stun ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,18 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 0.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, xi.mobskills.shadowBehavior.NUMSHADOWS_1) + local params = {} - -- <100 damage to pretty much anything, except on rare occasions. - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 0.5, 0.5, 0.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 6) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 6) -- TODO: Capture stun duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/shock_strike.lua b/scripts/actions/mobskills/shock_strike.lua index bcfb2eb50c5..f4173d5040b 100644 --- a/scripts/actions/mobskills/shock_strike.lua +++ b/scripts/actions/mobskills/shock_strike.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Shock Strike --- Ramuh delivers a single-hit blunt attack on target +-- Family: Avatar (Ramuh) +-- Description: Ramuh delivers a single-hit blunt attack on target. Additional Effect: Stun ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,13 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 1, 2, 3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.5, 3.5, 3.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 12) -- TODO: Capture stun duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/shockwave.lua b/scripts/actions/mobskills/shockwave.lua index 166b615ce98..378dbe78067 100644 --- a/scripts/actions/mobskills/shockwave.lua +++ b/scripts/actions/mobskills/shockwave.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Shockwave --- Delivers an area of effect attack. Sleeps enemies. +-- Family: Humanoid Great Sword Weaponskill +-- Description: Delivers an area of effect attack. Additional Effect: Sleep -- TODO: Verify sleep duration scaling with TP. ----------------------------------- ---@type TMobSkill @@ -11,17 +12,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.SLEEP_I, 1, 0, 180) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/shoulder_attack.lua b/scripts/actions/mobskills/shoulder_attack.lua index dfd3da9e25b..f99dff7b2c9 100644 --- a/scripts/actions/mobskills/shoulder_attack.lua +++ b/scripts/actions/mobskills/shoulder_attack.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Shoulder Attack --- Deals damage to a single target. Additional effect: knockback & stun +-- Family: Orc +-- Description: Deals damage to a single target. Additional Effect: Knockback & Stun ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,18 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - -- KNOCKBACK - local numhits = 1 - local accmod = 1 - local ftp = 1.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 4) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) -- TODO: Capture stun duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/shoulder_slam.lua b/scripts/actions/mobskills/shoulder_slam.lua index 366b7a12aa4..9be9d5d81dc 100644 --- a/scripts/actions/mobskills/shoulder_slam.lua +++ b/scripts/actions/mobskills/shoulder_slam.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Shoulder Attack --- Deals damage to a single target. Additional effect: knockback +-- Family: Antica +-- Description: Deals damage to a single target. Additional Effect: Knockback ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,14 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - -- KNOCKBACK - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/sickle_moon.lua b/scripts/actions/mobskills/sickle_moon.lua index e9376b42e50..ee814b1f5bb 100644 --- a/scripts/actions/mobskills/sickle_moon.lua +++ b/scripts/actions/mobskills/sickle_moon.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Sickle Moon --- Delivers a two-hit attack. Damage varies with TP. +-- Family: Humanoid Great Sword Weaponskill +-- Description: Delivers a two-hit attack. Damage varies with TP. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 2 - local accmod = 4 - local ftp = 2 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 2 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/sickle_slash.lua b/scripts/actions/mobskills/sickle_slash.lua index 7c7626bf16a..2dc0e36332f 100644 --- a/scripts/actions/mobskills/sickle_slash.lua +++ b/scripts/actions/mobskills/sickle_slash.lua @@ -1,18 +1,15 @@ ----------------------------------- -- Sickle Slash --- Deals critical damage. Chance of critical hit varies with TP. +-- Family: Spider +-- Description: Deals critical damage. Chance of critical hit varies with TP. +-- TODO: Split lua for Spiders and Ghrah ----------------------------------- ---@type TMobSkill local mobskillObject = {} ------------------------------------ --- onMobSkillCheck --- Check for Ghrah family spider form. --- If not in Spider form, then ignore. ------------------------------------ mobskillObject.onMobSkillCheck = function(target, mob, skill) if - mob:getFamily() == 122 and + mob:getFamily() == 122 and -- TODO: Set proper skill lists for Ghrah. mob:getAnimationSub() ~= 2 then return 1 @@ -22,14 +19,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.CRIT_VARIES, 1, 1.5, 2) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.attackMultiplier = { 1.5, 1.5, 1.5 } + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/sideswipe.lua b/scripts/actions/mobskills/sideswipe.lua index fc6fbdc20ba..aed8154cddd 100644 --- a/scripts/actions/mobskills/sideswipe.lua +++ b/scripts/actions/mobskills/sideswipe.lua @@ -1,7 +1,7 @@ ----------------------------------- --- Sideswipe --- Aern (NIN & MNK) --- Blinkable 1 hit, Knockback, Hate Reset +-- Sideswipe +-- Family: Aern (NIN & MNK) +-- Description: Deals physical damage to a single target. Additional Effect: Knockback, Hate Reset ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,17 +11,28 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 + local params = {} - -- TODO: Needs damage scaling capture - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.CRIT_VARIES, 1, 1, 1) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } -- TODO: Capture fTPS + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate - mob:resetEnmity(target) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + -- TODO: Capture hate reset type (Enmity wipe vs enmity turned off) + -- See Antica skill "Sand Trap" for reference + mob:resetEnmity(target) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/sidewinder.lua b/scripts/actions/mobskills/sidewinder.lua index 1bcec04a5f7..8e2fe29f48b 100644 --- a/scripts/actions/mobskills/sidewinder.lua +++ b/scripts/actions/mobskills/sidewinder.lua @@ -1,9 +1,9 @@ ----------------------------------- -- Sidewinder --- Trust: Semih Lafihna +-- Family: Humanoid Archery Weaponskill -- Delivers an inaccurate attack that deals quintuple damage. Accuracy varies with TP. -- Reverberation/Transfixtion/Detonation skillchain properties --- Modifiers: STR:20%; AGI:50% +-- Notes: Used by Semih Lafihna ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,13 +13,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 5.0 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.RANGED, xi.damageType.PIERCING, xi.mobskills.shadowBehavior.NUMSHADOWS_1) - target:takeDamage(dmg, mob, xi.attackType.RANGED, xi.damageType.PIERCING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 5.0, 5.0, 5.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + -- TODO: Accuracy modifier + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/sinuate_rush.lua b/scripts/actions/mobskills/sinuate_rush.lua index 428948aba4d..db5fb39dee4 100644 --- a/scripts/actions/mobskills/sinuate_rush.lua +++ b/scripts/actions/mobskills/sinuate_rush.lua @@ -1,10 +1,7 @@ ----------------------------------- --- Sinuate Rush --- Family: Hpemde --- Description: Damages nearby targets with an undulating attack. --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows --- Range: Unknown +-- Sinuate Rush +-- Family: Hpemde +-- Description: Damages nearby targets with an undulating attack. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,15 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.0 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_3) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/skewer.lua b/scripts/actions/mobskills/skewer.lua index 647706bbfc6..f82100932b4 100644 --- a/scripts/actions/mobskills/skewer.lua +++ b/scripts/actions/mobskills/skewer.lua @@ -1,8 +1,7 @@ ----------------------------------- -- Skewer --- Delivers a three-hit attack --- Type: Physical --- Range: Melee +-- Family: Humanoid Polearm Weaponskill +-- Description: Delivers a three-hit attack ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 1 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/skullbreaker.lua b/scripts/actions/mobskills/skullbreaker.lua index bec9fc914fd..7682e47d390 100644 --- a/scripts/actions/mobskills/skullbreaker.lua +++ b/scripts/actions/mobskills/skullbreaker.lua @@ -1,10 +1,7 @@ ----------------------------------- -- Skullbreaker --- --- Description: Lowers enemy's INT. Chance of lowering INT varies with TP. --- Type: Physical --- Utsusemi/Blink absorb: 1 Shadow --- Range: Melee +-- Family: Humanoid Club Weaponskill +-- Description: Deals physical damage to a single target. Additional Effect: INT Down ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,18 +12,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.0 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 1.1, 1.2, 1.3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - - if math.random(1, 100) < skill:getTP() / 3 then - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.INT_DOWN, 10, 3, 120) + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + -- TODO: Capture power/duration + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.INT_DOWN, 10, 9, 120) end - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/slam_dunk.lua b/scripts/actions/mobskills/slam_dunk.lua index 3fa9f973f3c..89299213e7c 100644 --- a/scripts/actions/mobskills/slam_dunk.lua +++ b/scripts/actions/mobskills/slam_dunk.lua @@ -1,6 +1,8 @@ ----------------------------------- -- Slam Dunk --- Deals damage to a single target. Additional effect: bind +-- Family: Orc +-- Description: Deals damage to a single target. Additional Effect: Bind +-- Notes: Used by melee orcs ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,16 +12,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.HTH, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BIND, 1, 0, 60) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.HTH + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.HTH) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIND, 1, 0, 60) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/sledgehammer.lua b/scripts/actions/mobskills/sledgehammer.lua index 6f2b56ddb6e..bf7702072ae 100644 --- a/scripts/actions/mobskills/sledgehammer.lua +++ b/scripts/actions/mobskills/sledgehammer.lua @@ -1,10 +1,8 @@ ----------------------------------- --- Sledgehammer --- Description: Delivers a sledgehammer blow to all targets in front. Additional effect: Petrification --- Type: Physical --- Utsusemi/Blink absorb: 3 shadows --- Range: Front cone --- Notes: Only used by Gurfurlur the Menacing. +-- Sledgehammer +-- Family: Troll +-- Description: Delivers a sledgehammer blow to all targets in front. Additional Effect: Petrification +-- Notes: Used by Gurfurlur the Menacing ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,17 +12,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3.2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, 3 * info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.PETRIFICATION, 1, 0, 60) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.2, 3.2, 3.2 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PETRIFICATION, 1, 0, 60) -- TODO: Capture duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/sling_bomb.lua b/scripts/actions/mobskills/sling_bomb.lua index 473333c5ede..9d1a73b7577 100644 --- a/scripts/actions/mobskills/sling_bomb.lua +++ b/scripts/actions/mobskills/sling_bomb.lua @@ -1,25 +1,33 @@ ----------------------------------- --- Sling Bomb --- Description: Deals damage to a single target. --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Sling Bomb +-- Family: Cluster +-- Description: Deals damage to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) + -- TODO: Jimmayus spreadsheet says can not be used when only one bomb remaining in formation. return 0 end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/smite_of_fury.lua b/scripts/actions/mobskills/smite_of_fury.lua index 4f080b38960..552f12f03d8 100644 --- a/scripts/actions/mobskills/smite_of_fury.lua +++ b/scripts/actions/mobskills/smite_of_fury.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Smite of Fury --- Heavy damage varies with TP. +-- Family: Evil Weapon +-- Description: Heavy damage varies with TP. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,16 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 4 + local params = {} - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 4.0, 4.0, 4.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - target: takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/smite_of_rage.lua b/scripts/actions/mobskills/smite_of_rage.lua index 05ca66b9368..70a7efaa884 100644 --- a/scripts/actions/mobskills/smite_of_rage.lua +++ b/scripts/actions/mobskills/smite_of_rage.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Smite of Rage --- Damage varies with TP. +-- Family: Evil Weapon +-- Description: Deals physical damage to a target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,16 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3 + local params = {} - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/smoke_discharger.lua b/scripts/actions/mobskills/smoke_discharger.lua index d88440a0d73..13c20e6948b 100644 --- a/scripts/actions/mobskills/smoke_discharger.lua +++ b/scripts/actions/mobskills/smoke_discharger.lua @@ -29,7 +29,7 @@ mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) if xi.mobskills.processDamage(mob, target, skill, action, info) then target:takeDamage(info.damage, mob, info.attackType, info.damageType) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.PETRIFICATION, 1, 3, 45) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PETRIFICATION, 1, 3, 45) if target:hasStatusEffect(xi.effect.ELEMENTALRES_DOWN) then target:delStatusEffectSilent(xi.effect.ELEMENTALRES_DOWN) diff --git a/scripts/actions/mobskills/somersault.lua b/scripts/actions/mobskills/somersault.lua index f3d9f25388a..78307666e36 100644 --- a/scripts/actions/mobskills/somersault.lua +++ b/scripts/actions/mobskills/somersault.lua @@ -1,9 +1,7 @@ ----------------------------------- -- Name: Somersault +-- Family: Fly -- Description: Delivers a powerful physical attack. --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,13 +11,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ATK_VARIES, 1.5, 1.5, 1.5) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.attackMultiplier = { 1.5, 1.5, 1.5 } + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/somersault_kick.lua b/scripts/actions/mobskills/somersault_kick.lua index 20abc32356c..e571e28b068 100644 --- a/scripts/actions/mobskills/somersault_kick.lua +++ b/scripts/actions/mobskills/somersault_kick.lua @@ -1,10 +1,7 @@ ----------------------------------- --- Somersault Kick --- --- Description: Somersaults a single target. Additional effect: Knockback --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Somersault Kick +-- Family: Mamool Ja +-- Description: Somersaults a single target. Additional Effect: Knockback ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/sonic_blade.lua b/scripts/actions/mobskills/sonic_blade.lua index 2e0a8031d39..1b509fbb0e3 100644 --- a/scripts/actions/mobskills/sonic_blade.lua +++ b/scripts/actions/mobskills/sonic_blade.lua @@ -1,16 +1,13 @@ ----------------------------------- --- Sonic Blade --- --- Description: Deals damage in an area of effect. --- Type: Physical --- 2-3 Shadows --- Range: Unknown +-- Sonic Blade +-- Family: Mammet +-- Description: Deals damage in an area of effect. ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - if mob:getAnimationSub() == 1 then + if mob:getAnimationSub() == 1 then -- Used in sword form return 0 end @@ -18,14 +15,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_2) - - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/soulshattering_roar.lua b/scripts/actions/mobskills/soulshattering_roar.lua index f90dce4be05..007b16c7d05 100644 --- a/scripts/actions/mobskills/soulshattering_roar.lua +++ b/scripts/actions/mobskills/soulshattering_roar.lua @@ -26,7 +26,7 @@ mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) if xi.mobskills.processDamage(mob, target, skill, action, info) then target:takeDamage(info.damage, mob, info.attackType, info.damageType) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.TERROR, 1, 0, 30) -- TODO: Capture duration + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.TERROR, 1, 0, 30) -- TODO: Capture duration end -- TODO: Temporary immunity to a single weapon damage type diff --git a/scripts/actions/mobskills/spike_flail.lua b/scripts/actions/mobskills/spike_flail.lua index 9d8256792cd..dca0f914649 100644 --- a/scripts/actions/mobskills/spike_flail.lua +++ b/scripts/actions/mobskills/spike_flail.lua @@ -1,12 +1,13 @@ ----------------------------------- -- Spike Flail +-- Family: Wyrm -- Deals extreme damage in a threefold attack to targets behind the user. ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - if mob:hasStatusEffect(xi.effect.MIGHTY_STRIKES) then + if mob:hasStatusEffect(xi.effect.MIGHTY_STRIKES) then -- TODO: We should probably handle these effect exceptions in the mob script. return 1 elseif mob:hasStatusEffect(xi.effect.SUPER_BUFF) then return 1 @@ -16,7 +17,7 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) return 1 elseif target:isInfront(mob, 128) then return 1 - elseif mob:getAnimationSub() == 1 then + elseif mob:getAnimationSub() == 1 then -- Not used while flying return 1 end @@ -24,13 +25,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 4 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_3) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 4.0, 4.0, 4.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/spikeball.lua b/scripts/actions/mobskills/spikeball.lua index e146e5b0539..4e8c04ea06c 100644 --- a/scripts/actions/mobskills/spikeball.lua +++ b/scripts/actions/mobskills/spikeball.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Spikeball --- Throws a spiky projectile at a single target. Additional effect: Poison +-- Family: Antica +-- Description: Throws a spiky projectile at a single target. Additional Effect: Poison ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,18 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.RANGED, xi.damageType.PIERCING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.RANGED, xi.damageType.PIERCING) - - if dmg > 0 then + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.POISON, 16, 3, 60) end - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/spinal_cleave.lua b/scripts/actions/mobskills/spinal_cleave.lua index 1836859cdaa..455412be0b6 100644 --- a/scripts/actions/mobskills/spinal_cleave.lua +++ b/scripts/actions/mobskills/spinal_cleave.lua @@ -1,11 +1,8 @@ ----------------------------------- --- Spinal Cleave --- Family: Qutrub --- Description: Performs a jumping slash on a single target. --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee --- Notes: Used only when wielding no weapon, and only when the second weapon is not broken. +-- Spinal Cleave +-- Family: Qutrub +-- Description: Performs a jumping slash on a single target. +-- Notes: Used only when wielding no weapon, and only when the second weapon is not broken. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -19,13 +16,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 3 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.CRIT_VARIES) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.IGNORE_SHADOWS) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/spine_lash.lua b/scripts/actions/mobskills/spine_lash.lua index a5e3bc16339..a3b8e473597 100644 --- a/scripts/actions/mobskills/spine_lash.lua +++ b/scripts/actions/mobskills/spine_lash.lua @@ -1,7 +1,7 @@ ----------------------------------- --- Spine Lash --- Phaubo --- Blinkable 1 hit, plague on hit. +-- Spine Lash +-- Family: Phaubo +-- Description: Deals physical damage to a single target. Additional Effect: Plague ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,16 +11,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.CRIT_VARIES, 1, 1, 1) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.NONE, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.PLAGUE, 5, 0, 120) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.NONE) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PLAGUE, 5, 0, 120) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/spinning_attack.lua b/scripts/actions/mobskills/spinning_attack.lua index 089b76cf90c..e3727b69f89 100644 --- a/scripts/actions/mobskills/spinning_attack.lua +++ b/scripts/actions/mobskills/spinning_attack.lua @@ -1,9 +1,8 @@ ----------------------------------- --- Spinning Attack --- Description: Spins into targets in a fan-shaped area of effect. Additional effect: Knockback --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows --- Range: 10' radial +-- Spinning Attack +-- Family: Magic Pot +-- Description: Spins into targets in a fan-shaped area of effect. Additional Effect: Knockback +-- TODO: Make lua file: "spinning_attack_magic_pot" and "spinning_attack_hth" ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,13 +12,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, xi.mobskills.shadowBehavior.NUMSHADOWS_3) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture fTPs + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/spinning_claw.lua b/scripts/actions/mobskills/spinning_claw.lua index cec8f937641..3c568beee20 100644 --- a/scripts/actions/mobskills/spinning_claw.lua +++ b/scripts/actions/mobskills/spinning_claw.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Spinning Claw --- Description: Slashes targets in an area of effect. --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows --- Range: 15' radial +-- Spinning Claw +-- Family: Opo-opo +-- Description: Slashes targets in an area of effect. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.0 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_3) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/spinning_dive.lua b/scripts/actions/mobskills/spinning_dive.lua index decb4db4e17..a5591c2da73 100644 --- a/scripts/actions/mobskills/spinning_dive.lua +++ b/scripts/actions/mobskills/spinning_dive.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Spinning Dive --- Leviathan delivers a single-hit attack on target. +-- Family: Avatar (Leviathan) +-- Description: Leviathan delivers a single-hit attack on target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 2 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 1, 2, 3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/spinning_fin.lua b/scripts/actions/mobskills/spinning_fin.lua index 8c286cb0440..1095e0293f4 100644 --- a/scripts/actions/mobskills/spinning_fin.lua +++ b/scripts/actions/mobskills/spinning_fin.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Spinning Fin --- Description: Damages enemies in an area of effect. Additional effect: Stun --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows --- Range: 10' radial +-- Spinning Fin +-- Family: Sahagin +-- Description: Damages enemies in an area of effect. Additional Effect: Stun ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.0 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_3) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 4) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) -- TODO: Capture stun duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/spinning_scythe.lua b/scripts/actions/mobskills/spinning_scythe.lua index 24d4f767665..ee7280d070d 100644 --- a/scripts/actions/mobskills/spinning_scythe.lua +++ b/scripts/actions/mobskills/spinning_scythe.lua @@ -1,8 +1,7 @@ ----------------------------------- -- Spinning Scythe +-- Family: Humanoid Scythe Weaponskill -- Description: Delivers an area of effect attack. Attack radius varies with TP. --- Type: Physical --- Range: Melee range radial ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,15 +12,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_1) + local params = {} - -- 150-200 damage - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/spinning_top.lua b/scripts/actions/mobskills/spinning_top.lua index 286b654e25c..abf6c10cc69 100644 --- a/scripts/actions/mobskills/spinning_top.lua +++ b/scripts/actions/mobskills/spinning_top.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Spinning Top --- Description: Deals damage in an area of effect. --- Type: Physical --- Utsusemi/Blink absorb: 2-4 shadows --- Range: 10' radial +-- Spinning Top +-- Family: Diremite +-- Description: Deals damage in an area of effect. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = math.random(2, 4) - local accmod = 1 - local ftp = .8 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } -- TODO: Capture fTP scalings + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/spiral_hell.lua b/scripts/actions/mobskills/spiral_hell.lua index 2de252af8a0..51f9e50b15c 100644 --- a/scripts/actions/mobskills/spiral_hell.lua +++ b/scripts/actions/mobskills/spiral_hell.lua @@ -1,8 +1,7 @@ ----------------------------------- -- Spiral Hell --- Delivers a single-hit attack --- Type: Physical --- Range: Melee +-- Family: Humanoid Scythe Weaponskill +-- Description: Delivers a single-hit attack ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,15 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.25 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ATK_VARIES, 1, 1, 1) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.25, 1.25, 1.25 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/spiral_spin.lua b/scripts/actions/mobskills/spiral_spin.lua index fbb4b0a0981..5dbbdc19059 100644 --- a/scripts/actions/mobskills/spiral_spin.lua +++ b/scripts/actions/mobskills/spiral_spin.lua @@ -1,7 +1,7 @@ ----------------------------------- --- Spiral Spin --- Description: Chance of effect varies with TP. Additional Effect: Accuracy Down. --- Type: Physical (Slashing) +-- Spiral Spin +-- Family: Ladybug +-- Description: Deals conal AoE physical damage to targets in front of mob. Additional Effect: Accuracy Down. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,16 +11,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 2 - local ftp = 2 -- TODO: can crit - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.ACCURACY_DOWN, 40, 0, 60) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.ACCURACY_DOWN, 40, 0, 60) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/sprout_smack.lua b/scripts/actions/mobskills/sprout_smack.lua index fbf3f47a5eb..dcacf29e631 100644 --- a/scripts/actions/mobskills/sprout_smack.lua +++ b/scripts/actions/mobskills/sprout_smack.lua @@ -1,7 +1,7 @@ ----------------------------------- --- Sprout Smack --- Description: Additional effect: Slow. Duration of effect varies with TP. --- Type: Physical (Blunt) +-- Sprout Smack +-- Family: Treant Sapling +-- Description: Deals physical damage to a single target. Additional Effect: Slow ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,16 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.SLOW, 3000, 0, 90) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + -- TODO: Slow MACC is low, may vary with TP (Not yet supported) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.SLOW, 3000, 0, 90) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/sprout_spin.lua b/scripts/actions/mobskills/sprout_spin.lua index 931b1480eaf..cc39c159919 100644 --- a/scripts/actions/mobskills/sprout_spin.lua +++ b/scripts/actions/mobskills/sprout_spin.lua @@ -1,7 +1,7 @@ ----------------------------------- -- Sprout Spin --- Smacks around enemies in an area of effect. Additional effect: Knockback --- Range : 15' AoE +-- Family: Treant Sapling +-- Description: Deals AoE physical damage to targets in range of mob. Additional Effect: Knockback ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,14 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.0 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/stampede.lua b/scripts/actions/mobskills/stampede.lua index 3ee825da6ac..243aa37d759 100644 --- a/scripts/actions/mobskills/stampede.lua +++ b/scripts/actions/mobskills/stampede.lua @@ -1,5 +1,7 @@ ----------------------------------- -- Stampede +-- Family: Marid +-- Description: Delivers a twofold attack to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -9,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 2 - local accmod = 1 - local ftp = 1.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 2 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/stasis.lua b/scripts/actions/mobskills/stasis.lua index 8a77408cb6d..57ea4fede2b 100644 --- a/scripts/actions/mobskills/stasis.lua +++ b/scripts/actions/mobskills/stasis.lua @@ -1,9 +1,7 @@ ----------------------------------- -- Stasis +-- Family: Scorpion -- Description: Deals physical damage to a single target. Additional Effect : Paralysis, Enmity Reset --- Type: Enfeebling --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,21 +11,28 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.PARALYSIS, 20, 0, 20) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - if xi.mobskills.mobPhysicalHit(skill) then + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PARALYSIS, 20, 0, 20) + + -- TODO: Capture hate reset type (Enmity wipe vs enmity turned off) + -- See Antica skill "Sand Trap" for reference target:resetEnmity(mob) end - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/static_filament.lua b/scripts/actions/mobskills/static_filament.lua index 53f98674feb..aa73d1aac4f 100644 --- a/scripts/actions/mobskills/static_filament.lua +++ b/scripts/actions/mobskills/static_filament.lua @@ -26,7 +26,7 @@ mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) if xi.mobskills.processDamage(mob, target, skill, action, info) then target:takeDamage(info.damage, mob, info.attackType, info.damageType) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 4) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) end return info.damage diff --git a/scripts/actions/mobskills/stave_toss.lua b/scripts/actions/mobskills/stave_toss.lua index 6fd59079e55..e18fb0bb55c 100644 --- a/scripts/actions/mobskills/stave_toss.lua +++ b/scripts/actions/mobskills/stave_toss.lua @@ -1,5 +1,8 @@ ----------------------------------- --- Stave Toss (staff wielding Mamool Ja only!) +-- Stave Toss +-- Family: Mamool Ja +-- Description: Mob throws weapon to deal physical damage to a target. Weapon is discarded. +-- Notes: Used by staff wielding Mamool Ja ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -8,7 +11,7 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) -- If animationSub is non-zero, mob has already lost the weapon. if mob:getAnimationSub() == 0 and - (mob:getMainJob() == xi.job.BLM or mob:getMainJob() == xi.job.WHM) + (mob:getMainJob() == xi.job.BLM or mob:getMainJob() == xi.job.WHM) -- TODO: Set proper skill lists then return 0 end @@ -17,15 +20,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) + local params = {} + + -- TODO: Ranged or melee formula? + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + skill:setFinalAnimationSub(2) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ACC_VARIES) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/stellar_arrow.lua b/scripts/actions/mobskills/stellar_arrow.lua index f41e9238ee2..cef69f59c1f 100644 --- a/scripts/actions/mobskills/stellar_arrow.lua +++ b/scripts/actions/mobskills/stellar_arrow.lua @@ -1,7 +1,8 @@ ----------------------------------- --- Stellar Arrow (AOE) --- Trust: Semih Lafihna --- Darkness/Gravitation skillchain properties, AoE damage +-- Stellar Arrow +-- Family: Humanoid (Trust: Semih Lafihna) +-- Description: Delivers an AoE attack. +-- Darkness/Gravitation skillchain properties ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,13 +12,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.RANGED, xi.damageType.PIERCING, xi.mobskills.shadowBehavior.WIPE_SHADOWS) - target:takeDamage(dmg, mob, xi.attackType.RANGED, xi.damageType.PIERCING) - return dmg + local params = {} + + -- TODO: Physical or Magical? + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/stifling_tantara.lua b/scripts/actions/mobskills/stifling_tantara.lua index b13b0a5c654..8ab7a472d42 100644 --- a/scripts/actions/mobskills/stifling_tantara.lua +++ b/scripts/actions/mobskills/stifling_tantara.lua @@ -1,10 +1,7 @@ ----------------------------------- -- Stifling Tantara --- +-- Family: Imp -- Description: Inflicts silence in an area of effect and deals damage. --- Type: Enfeebling --- Utsusemi/Blink absorb: Strips shadows --- Range: 10' as well as single target outside of 10' -- Notes: Doesn't use this if its horn is broken. Used only by certain Imp NMs, in place of Deafening Tantara. ----------------------------------- ---@type TMobSkill @@ -19,16 +16,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3.0 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.MAGICAL, xi.damageType.ELEMENTAL, xi.mobskills.shadowBehavior.WIPE_SHADOWS) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.SILENCE, 1, 0, 60) + -- TODO: Capture if magical or physical + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.WIPE_SHADOWS -- TODO: Capture shadowBehavior - target:takeDamage(dmg, mob, xi.attackType.MAGICAL, xi.damageType.ELEMENTAL) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.SILENCE, 1, 0, 60) -- TODO: Capture power/duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/stomping.lua b/scripts/actions/mobskills/stomping.lua index e1eabfd7bca..4473188deec 100644 --- a/scripts/actions/mobskills/stomping.lua +++ b/scripts/actions/mobskills/stomping.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Stomping --- Deals heavy damage to a single target. +-- Family: Dhalmel +-- Description: Deals heavy damage to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,13 +11,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ATK_VARIES, 1.5, 1.5, 1.5) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.attackMultiplier = { 1.5, 1.5, 1.5 } + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/stone_throw.lua b/scripts/actions/mobskills/stone_throw.lua index 8922d126faf..bc0fb2dc011 100644 --- a/scripts/actions/mobskills/stone_throw.lua +++ b/scripts/actions/mobskills/stone_throw.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Stone Throw --- Description: Damages a single target. Additional effect: Paralysis --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Stone Throw +-- Family: Opo-opo +-- Description: Damages a single target. Additional Effect: Paralysis ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,17 +11,27 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 - local info = xi.mobskills.mobRangedMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.RANGED, xi.damageType.BLUNT, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.RANGED, xi.damageType.BLUNT) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.skipParry = true + params.skipGuard = true + params.skipBlock = true - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.PARALYSIS, 50, 0, 60) + local info = xi.mobskills.mobRangedMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PARALYSIS, 50, 0, 60) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/sub-zero_smash.lua b/scripts/actions/mobskills/sub-zero_smash.lua index d68757710c3..9d503b541b6 100644 --- a/scripts/actions/mobskills/sub-zero_smash.lua +++ b/scripts/actions/mobskills/sub-zero_smash.lua @@ -1,13 +1,12 @@ ----------------------------------- --- Sub-Zero Smash --- --- Description: Additional Effect: Paralysis. Damage varies with TP. --- Type: Physical (blunt) --- Range: Cone (5' yalms) --- Notes: This spell should be used anytime the target is behind the mob. --- However the online documentation suggests that this spell can --- still be used anytime. As a result, any other Ruszor spells --- should not trigger if the target is behind the mob. +-- Sub-Zero Smash +-- Family: Ruszor +-- Description: Additional Effect: Paralysis. Damage varies with TP. +-- Range: Cone (5' yalms) +-- Notes: This spell should be used anytime the target is behind the mob. +-- However the online documentation suggests that this spell can +-- still be used anytime. As a result, any other Ruszor spells +-- should not trigger if the target is behind the mob. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -17,16 +16,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 -- Hits once, despite the animation looking like it hits twice. - local ftp = 1 - local accmod = 1 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.PARALYSIS, 10, 0, 100) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS -- TODO: Capture shadowBehavior - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PARALYSIS, 10, 0, 100) -- TODO: Capture power/duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/suction.lua b/scripts/actions/mobskills/suction.lua index d3c5f52a2fb..009a77b509f 100644 --- a/scripts/actions/mobskills/suction.lua +++ b/scripts/actions/mobskills/suction.lua @@ -1,11 +1,7 @@ ----------------------------------- --- Suction --- --- Description: Deals damage to a single target. Additional effect: Stun --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee --- Notes: Stun doesn't always occur. +-- Suction +-- Family: Leech +-- Description: Deals damage to a single target. Additional Effect: Stun ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 4) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) -- TODO: Capture stun duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/sudden_lunge.lua b/scripts/actions/mobskills/sudden_lunge.lua index 03f6e971b22..d9d0eb4e377 100644 --- a/scripts/actions/mobskills/sudden_lunge.lua +++ b/scripts/actions/mobskills/sudden_lunge.lua @@ -1,6 +1,8 @@ ----------------------------------- -- Sudden Lunge --- Knockback damage and Stun effect. Ignores Utsusemi, reduces Ladybug's HP by 5%-15% whether it hits or not. +-- Family: Ladybug +-- Description: Deals physical damage to a target. Additional effect: Knockback, Stun. +-- Notes: Reduces Ladybug's HP by 5%-15% whether it hits or not. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,21 +12,31 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, xi.mobskills.shadowBehavior.IGNORE_SHADOWS) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 4) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) -- TODO: Capture stun duration + end + + return info.damage +end + +mobskillObject.onMobSkillFinalize = function(mob, skill) local currentHP = mob:getHP() local newHP = currentHP - (currentHP * (math.random(5, 15) / 100)) - mob:setHP(newHP) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - - return dmg + mob:setHP(newHP) end return mobskillObject diff --git a/scripts/actions/mobskills/sweep.lua b/scripts/actions/mobskills/sweep.lua index f4088405573..8851917da2d 100644 --- a/scripts/actions/mobskills/sweep.lua +++ b/scripts/actions/mobskills/sweep.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Sweep --- Description: Damages enemies in an area of effect. Additional effect: Stun --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows --- Range: 10' radial +-- Sweep +-- Family: Yagudo +-- Description: Damages enemies in an area of effect. Additional Effect: Stun ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_3) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 4) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) -- TODO: Capture stun duration/power + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/sweeping_flail.lua b/scripts/actions/mobskills/sweeping_flail.lua index 9bfd611dbd7..fce0b7e8c62 100644 --- a/scripts/actions/mobskills/sweeping_flail.lua +++ b/scripts/actions/mobskills/sweeping_flail.lua @@ -1,11 +1,8 @@ ----------------------------------- --- Sweeping Flail --- Family: Bahamut --- Description: Spins around to deal physical damage to enemies behind user. Additional effect: Knockback --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows --- Range: 20' cone --- Notes: Used when someone pulls hate from behind Bahamut. +-- Sweeping Flail +-- Family: Bahamut +-- Description: Spins around to deal physical damage to enemies behind user. Additional Effect: Knockback +-- Notes: Used when someone pulls hate from behind Bahamut. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -19,13 +16,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_3) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + -- TODO: Capture Knockback value + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/swift_blade.lua b/scripts/actions/mobskills/swift_blade.lua index 1371f747eae..28a9a98eda6 100644 --- a/scripts/actions/mobskills/swift_blade.lua +++ b/scripts/actions/mobskills/swift_blade.lua @@ -1,9 +1,7 @@ ----------------------------------- -- Swift Blade +-- Family: Humanoid Sword Weaponskill -- Description: Delivers a three-hit attack. Accuracy varies with TP. --- Type: Physical --- Utsusemi/Blink absorb: Shadow per hit --- Range: Melee ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,15 +12,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ACC_VARIES, 1, 2, 3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - -- Around 700 damage from AA HM - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 + -- TODO: Accuracy modifier + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/tachi_gekko.lua b/scripts/actions/mobskills/tachi_gekko.lua index 650bd27b98a..b732e38c338 100644 --- a/scripts/actions/mobskills/tachi_gekko.lua +++ b/scripts/actions/mobskills/tachi_gekko.lua @@ -1,10 +1,7 @@ ----------------------------------- --- Tachi: Gekko --- --- Description: Silences target. Damage varies with TP. --- Type: Physical --- Shadow per hit --- Range: Melee +-- Tachi: Gekko +-- Family: Humanoid Great Katana Weaponskill +-- Description: Silences target. Damage varies with TP. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,17 +12,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.5 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.SILENCE, 1, 0, 60) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.5, 2.5, 2.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - -- About 300-400 to a DD. - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.SILENCE, 1, 0, 60) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/tachi_kaiten.lua b/scripts/actions/mobskills/tachi_kaiten.lua index d5d57469c96..6626eeaf9f0 100644 --- a/scripts/actions/mobskills/tachi_kaiten.lua +++ b/scripts/actions/mobskills/tachi_kaiten.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Tachi:Kaiten --- --- Description: Amanomurakumo/Totsukanotsurugi: Temporarily increases amount of TP stored with each hit. --- Type: Physical --- Range: Melee +-- Tachi:Kaiten +-- Family: Humanoid Great Katana Weaponskill +-- Description: Amanomurakumo/Totsukanotsurugi: Temporarily increases amount of TP stored with each hit. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,15 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.5 -- fTP and fTP scaling unknown. TODO: capture ftp + local params = {} - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.5, 2.5, 2.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/tachi_kasha.lua b/scripts/actions/mobskills/tachi_kasha.lua index 3a92bbf586d..d1f45948a91 100644 --- a/scripts/actions/mobskills/tachi_kasha.lua +++ b/scripts/actions/mobskills/tachi_kasha.lua @@ -1,10 +1,7 @@ ----------------------------------- --- Tachi: Kasha --- --- Description: Paralyzes target. Damage varies with TP. --- Type: Physical --- Shadow per hit --- Range: Melee +-- Tachi: Kasha +-- Family: Humanoid Great Katana Weaponskill +-- Description: Paralyzes target. Damage varies with TP. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,17 +12,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3.5 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PARALYSIS, 25, 0, 60) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.5, 3.5, 3.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - -- About 400-500 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PARALYSIS, 25, 0, 60) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/tachi_yukikaze.lua b/scripts/actions/mobskills/tachi_yukikaze.lua index 7a969766437..1fceec7c0b4 100644 --- a/scripts/actions/mobskills/tachi_yukikaze.lua +++ b/scripts/actions/mobskills/tachi_yukikaze.lua @@ -1,10 +1,7 @@ ----------------------------------- --- Tachi: Yukikaze --- --- Description: Blinds target. Damage varies with TP. --- Type: Physical --- Shadow per hit --- Range: Melee +-- Tachi: Yukikaze +-- Family: Humanoid Great Katana Weaponskill +-- Description: Blinds target. Damage varies with TP. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,17 +12,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BLINDNESS, 25, 0, 60) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - -- Never actually got a good damage sample. Putting it between Gekko and Kasha. - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BLINDNESS, 25, 0, 60) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/tackle.lua b/scripts/actions/mobskills/tackle.lua index 0927cc3b50a..14053a99571 100644 --- a/scripts/actions/mobskills/tackle.lua +++ b/scripts/actions/mobskills/tackle.lua @@ -1,7 +1,7 @@ ----------------------------------- --- Tackle --- Description: Stuns target. Chance of stunning varies with TP. --- Type: Physical +-- Tackle +-- Family: Humanoid (Maat) +-- Description: Deals physical damage to a target. Additional Effect: Stun ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.7 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 4) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.7, 2.7, 2.7 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) -- TODO: Capture stun duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/tail_blow.lua b/scripts/actions/mobskills/tail_blow.lua index 71937d1f5f0..dd2dc6af526 100644 --- a/scripts/actions/mobskills/tail_blow.lua +++ b/scripts/actions/mobskills/tail_blow.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Tail Blow --- Description: Deals damage to a single target. Additional effect: Stun --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Tail Blow +-- Family: Lizard +-- Description: Deals damage to a single target. Additional Effect: Stun ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,17 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 4) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) -- TODO: Capture stun duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/tail_crush.lua b/scripts/actions/mobskills/tail_crush.lua index c8bf61b87c7..a738c19b1d5 100644 --- a/scripts/actions/mobskills/tail_crush.lua +++ b/scripts/actions/mobskills/tail_crush.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Tail Crush --- Description: Smashes a single target with its tail. Additional effect: Poison --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Tail Crush +-- Family: Wyvern +-- Description: Smashes a single target with its tail. Additional Effect: Poison ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,18 +11,27 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.CRIT_VARIES, 1, 1, 1) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate - local duration = 30 + math.min(math.floor(skill:getTP() / 1000), 3) * 30 - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.POISON, 17, 3, duration) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + local duration = 30 + math.min(math.floor(skill:getTP() / 1000), 3) * 30 + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.POISON, 17, 3, duration) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/tail_lash.lua b/scripts/actions/mobskills/tail_lash.lua index 6b61688ed01..df0570991a7 100644 --- a/scripts/actions/mobskills/tail_lash.lua +++ b/scripts/actions/mobskills/tail_lash.lua @@ -1,10 +1,8 @@ ----------------------------------- --- Tail Lash --- Description: Deals damage in an area of effect. Additional effect: Amnesia --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows --- Range: Unknown cone, backwards --- Notes: Only used when Amphipteres are attacking with their tail. +-- Tail Lash +-- Family: Amphiptere +-- Description: Deals damage in an area of effect. Additional Effect: Amnesia +-- Notes: Used when Amphipteres are attacking with their tail. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -18,14 +16,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_2) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.AMNESIA, 1, 0, 60) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.AMNESIA, 1, 0, 60) -- TODO: Capture power/duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/tail_roll.lua b/scripts/actions/mobskills/tail_roll.lua index 11189bebe6a..bf3b6621dde 100644 --- a/scripts/actions/mobskills/tail_roll.lua +++ b/scripts/actions/mobskills/tail_roll.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Tail Roll --- Deals damage to a single target. +-- Family: Bugard +-- Description: Deals conal AoE physical damage to targets in front of mob. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,14 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + local params = {} - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/tail_slap.lua b/scripts/actions/mobskills/tail_slap.lua index f79fe42472d..948d00c9d65 100644 --- a/scripts/actions/mobskills/tail_slap.lua +++ b/scripts/actions/mobskills/tail_slap.lua @@ -1,7 +1,7 @@ ----------------------------------- --- Tail Slap --- Description: Delivers an area attack. Additional effect: "Stun." Damage varies with TP. --- Type: Physical (Blunt) +-- Tail Slap +-- Family: Lamia +-- Description: Deals conal AoE physical damage to targets in front of mob. Additional Effect: Knockback, Stun ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ATK_VARIES, 1, 2, 3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 4) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) -- TODO: Capture stun duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/tail_smash.lua b/scripts/actions/mobskills/tail_smash.lua index e7cc433b969..b88100a2e9a 100644 --- a/scripts/actions/mobskills/tail_smash.lua +++ b/scripts/actions/mobskills/tail_smash.lua @@ -1,11 +1,7 @@ ----------------------------------- --- Tail Smash --- --- Description: Deals damage to a single target. --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee --- Notes: Additional Effect: Bind +-- Tail Smash +-- Family: Manticore +-- Description: Deals damage to a single target. Additional Effect: Bind ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,17 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BIND, 1, 0, 90) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIND, 1, 0, 90) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/tail_swing.lua b/scripts/actions/mobskills/tail_swing.lua index a6674cc1257..b674f2b354c 100644 --- a/scripts/actions/mobskills/tail_swing.lua +++ b/scripts/actions/mobskills/tail_swing.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Tail Swing --- Description: Deals damage to a single target. Additional effect: Bind --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Tail Swing +-- Family: Manticore +-- Description: Deals damage to a single target. Additional Effect: Bind ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,17 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BIND, 1, 0, 90) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIND, 1, 0, 90) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/tail_thrust.lua b/scripts/actions/mobskills/tail_thrust.lua index fa8b210ddb7..4b1226a23b3 100644 --- a/scripts/actions/mobskills/tail_thrust.lua +++ b/scripts/actions/mobskills/tail_thrust.lua @@ -1,11 +1,7 @@ ----------------------------------- --- Tail Thrust --- Family: Hpemde --- Description: Strikes a single target with its tail. --- Type: Physical --- Utsusemi/Blink absorb: One shadow --- Range: Unknown --- Notes: Additional effect - paralyze +-- Tail Thrust +-- Family: Hpemde +-- Description: Deals physical damage to a single target. Additional Effect: Paralysis ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,16 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.PARALYSIS, 10, 0, math.random(30, 60)) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + -- TODO: Random? Or does it scale with TP? + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PARALYSIS, 10, 0, math.random(30, 60)) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/tail_whip.lua b/scripts/actions/mobskills/tail_whip.lua index 4a05f20cace..d4412b1f7b1 100644 --- a/scripts/actions/mobskills/tail_whip.lua +++ b/scripts/actions/mobskills/tail_whip.lua @@ -1,5 +1,7 @@ ----------------------------------- -- Tail Whip +-- Family: Avatar (Leviathan) +-- Description: Deals physical damage to a target. Additional Effect: Weight ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -9,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.0 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_3) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.WEIGHT, 50, 0, 120) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.WEIGHT, 50, 0, 120) -- TODO: Capture power/duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/tartaric_sigil.lua b/scripts/actions/mobskills/tartaric_sigil.lua index bb818b967d1..6c05c86373d 100644 --- a/scripts/actions/mobskills/tartaric_sigil.lua +++ b/scripts/actions/mobskills/tartaric_sigil.lua @@ -1,5 +1,6 @@ ----------------------------------- -- Tartaric Sigil +-- Family: Humanoid (August) ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,7 +13,7 @@ mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) local params = {} params.baseDamage = mob:getMainLvl() * 3 - params.fTP = { 1.25, 1.25, 1.25 } + params.fTP = { 3.75, 3.75, 3.75 } params.element = xi.element.DARK params.attackType = xi.attackType.MAGICAL params.damageType = xi.damageType.DARK @@ -23,15 +24,14 @@ mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) if xi.mobskills.processDamage(mob, target, skill, action, info) then target:takeDamage(info.damage, mob, info.attackType, info.damageType) local duration = (skill:getTP() / 100) / 6 -- 2 sec min, 5 sec max + if duration < 2 then duration = 2 end xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.AMNESIA, 1, 0, duration) - end - if info.damage > 0 then - mob:addTP(134) + -- mob:addTP(134) -- TODO: Is TP return a set amount or does August's delay influence it? end return info.damage diff --git a/scripts/actions/mobskills/tentacle.lua b/scripts/actions/mobskills/tentacle.lua index 57bbe11d077..24bf193e4d9 100644 --- a/scripts/actions/mobskills/tentacle.lua +++ b/scripts/actions/mobskills/tentacle.lua @@ -1,6 +1,7 @@ ----------------------------------- --- Tentable --- Deals damage to a single target. +-- Tentacle +-- Family: Sea Monk +-- Description: Deals damage to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,14 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/tenzen_ranged_high.lua b/scripts/actions/mobskills/tenzen_ranged_high.lua index 29529cce100..e9508f16cb0 100644 --- a/scripts/actions/mobskills/tenzen_ranged_high.lua +++ b/scripts/actions/mobskills/tenzen_ranged_high.lua @@ -1,7 +1,8 @@ ----------------------------------- -- Tenzed Ranged Attack Alt --- Only Used when in Bow Mode --- Deals a ranged attack to a single target. +-- Family: Humanoid (Tenzen) +-- Description: Deals a ranged attack to a single target. +-- Notes: Only Used when in Bow Mode ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,27 +12,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local dmgmod = 1.5 + local params = {} - local info = xi.mobskills.mobRangedMove(mob, target, skill, numhits, accmod, dmgmod, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.RANGED, xi.damageType.PIERCING, info.hitslanded) - local msg = skill:getMsg() - if - dmg > 0 and - msg ~= xi.msg.basic.SHADOW_ABSORB - then - target:addTP(20) - mob:addTP(80) - end + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.RANGED + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.primaryMessage = xi.msg.basic.RANGED_ATTACK_HIT + params.skipParry = true + params.skipGuard = true + params.skipBlock = true + + local info = xi.mobskills.mobRangedMove(mob, target, skill, action, params) - if msg ~= xi.msg.basic.SHADOW_ABSORB then - target:takeDamage(dmg, mob, xi.attackType.RANGED, xi.damageType.PIERCING) + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) end - skill:setMsg(352) -- fixes incorrect messages on ranged attacks - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/tenzen_ranged_low.lua b/scripts/actions/mobskills/tenzen_ranged_low.lua index 29529cce100..e9508f16cb0 100644 --- a/scripts/actions/mobskills/tenzen_ranged_low.lua +++ b/scripts/actions/mobskills/tenzen_ranged_low.lua @@ -1,7 +1,8 @@ ----------------------------------- -- Tenzed Ranged Attack Alt --- Only Used when in Bow Mode --- Deals a ranged attack to a single target. +-- Family: Humanoid (Tenzen) +-- Description: Deals a ranged attack to a single target. +-- Notes: Only Used when in Bow Mode ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,27 +12,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local dmgmod = 1.5 + local params = {} - local info = xi.mobskills.mobRangedMove(mob, target, skill, numhits, accmod, dmgmod, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.RANGED, xi.damageType.PIERCING, info.hitslanded) - local msg = skill:getMsg() - if - dmg > 0 and - msg ~= xi.msg.basic.SHADOW_ABSORB - then - target:addTP(20) - mob:addTP(80) - end + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.RANGED + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.primaryMessage = xi.msg.basic.RANGED_ATTACK_HIT + params.skipParry = true + params.skipGuard = true + params.skipBlock = true + + local info = xi.mobskills.mobRangedMove(mob, target, skill, action, params) - if msg ~= xi.msg.basic.SHADOW_ABSORB then - target:takeDamage(dmg, mob, xi.attackType.RANGED, xi.damageType.PIERCING) + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) end - skill:setMsg(352) -- fixes incorrect messages on ranged attacks - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/tera_slash.lua b/scripts/actions/mobskills/tera_slash.lua index 27da0148eee..45ce4340e55 100644 --- a/scripts/actions/mobskills/tera_slash.lua +++ b/scripts/actions/mobskills/tera_slash.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Tera Slash --- Description: Deals high damage to players within a fan-shaped area of effect. --- Type: Physical --- Utsusemi/Blink absorb: Ignores shadows --- Range: Unknown cone +-- Tera Slash +-- Family: Shadow Lord (Dynamis Lord) +-- Description: Deals high damage to players within a fan-shaped area of effect. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,15 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 2 - local ftp = 5 -- fTP and fTP scaling unknown. TODO: capture ftp + local params = {} - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.IGNORE_SHADOWS) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 5.0, 5.0, 5.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/terror_touch.lua b/scripts/actions/mobskills/terror_touch.lua index bf6d4458e54..ad74fa0a0c2 100644 --- a/scripts/actions/mobskills/terror_touch.lua +++ b/scripts/actions/mobskills/terror_touch.lua @@ -1,9 +1,7 @@ ----------------------------------- -- Terror Touch --- Description: Touches a single target. Additional Effect : Attack Down --- Type: Physical (Blunt) --- Utsusemi/Blink absorb: 1 Shadow --- Range: 7.0' +-- Family: Ghost +-- Description: Deals physical damage to a single target. Additional Effect : Attack Down ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,16 +11,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.ATTACK_DOWN, 70, 0, 90) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.ATTACK_DOWN, 70, 0, 90) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/the_wrath_of_gudha.lua b/scripts/actions/mobskills/the_wrath_of_gudha.lua index c33d14e99d7..716c7f6f1db 100644 --- a/scripts/actions/mobskills/the_wrath_of_gudha.lua +++ b/scripts/actions/mobskills/the_wrath_of_gudha.lua @@ -1,5 +1,7 @@ ----------------------------------- -- The Wrath of Gudha +-- Family: Quadav +-- Description: Deals physical damage to targets in range of mob. Additional Effect: Knockback, Weight ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -9,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, 0, 1, 2, 3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.NONE, info.hitslanded) + local params = {} - xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.WEIGHT, 80, 0, 10) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 5.0, 5.0, 5.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING -- TODO: Capture damageType + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.NONE) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.WEIGHT, 80, 0, 10) -- TODO: Capture power/duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/thrashing_assault.lua b/scripts/actions/mobskills/thrashing_assault.lua index 2d7226db16d..af853f67909 100644 --- a/scripts/actions/mobskills/thrashing_assault.lua +++ b/scripts/actions/mobskills/thrashing_assault.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Thrashing Assault --- Physical damage + Defense Down. Absorbed by 4 shadows. +-- Family: Meeble +-- Description: Delivers a fourfold attack to a target. Additional Effect: Defense Down ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,17 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 4 - local accmod = 1 - local ftp = 2.0 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 15) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.DEFENSE_BOOST, 50, 0, 60) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 4 + params.fTP = { 1.0, 1.0, 1.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_4 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.DEFENSE_DOWN, 50, 0, 60) -- TODO: Capture power/duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/throat_stab.lua b/scripts/actions/mobskills/throat_stab.lua index e9400514f03..7bdbed16318 100644 --- a/scripts/actions/mobskills/throat_stab.lua +++ b/scripts/actions/mobskills/throat_stab.lua @@ -1,11 +1,8 @@ ----------------------------------- --- Throat Stab --- --- Description: Deals damage to a single target reducing their HP to 5%. Resets enmity. --- Type: Physical --- Utsusemi/Blink absorb: No --- Range: Single Target --- Notes: Very short range, easily evaded by walking away from it. +-- Throat Stab +-- Family: Tonberry +-- Description: Deals damage to a single target reducing their HP to 5%. Resets enmity. +-- Notes: Very short range, easily evaded by walking away from it. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,24 +12,31 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local currentHP = target:getHP() - local damage = currentHP + local params = {} - -- if have more hp then 30%, then reduce to 5% - if currentHP / target:getMaxHP() > 0.2 then - damage = currentHP * .95 - end + params.baseDamage = target:getHP() + params.numHits = 1 + params.fTP = { 0.95, 0.95, 0.95 } -- TODO: Capture % of current HP this does. + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS + params.skipFSTR = true + params.skipPDIF = true + params.skipParry = true -- TODO: Confirm this can't be parried, guarded or blocked. + params.skipGuard = true + params.skipBlock = true + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - local info = - { - damage = damage - } + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, xi.mobskills.shadowBehavior.IGNORE_SHADOWS) + -- TODO: Capture hate reset type (Enmity wipe vs enmity turned off) + -- See Antica skill "Sand Trap" for reference + mob:resetEnmity(target) + end - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - mob:resetEnmity(target) - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/tidal_dive.lua b/scripts/actions/mobskills/tidal_dive.lua index 6fbe01bfe9c..c1e45476b0d 100644 --- a/scripts/actions/mobskills/tidal_dive.lua +++ b/scripts/actions/mobskills/tidal_dive.lua @@ -1,11 +1,8 @@ ----------------------------------- --- Tidal Dive --- --- Description: Dives at nearby targets. Additional effect: Weight and/or Bind (Status Effect) --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows --- Range: Unknown radial --- Notes: Only used over water. +-- Tidal Dive +-- Family: Phuabo +-- Description: Dives at nearby targets. Additional Effect: Bind, Weight +-- Notes: Only used over deep water. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -23,17 +20,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = math.random(2, 3) - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.NONE, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BIND, 1, 0, 60) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.WEIGHT, 50, 0, 120) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING -- TODO: Capture damageType + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.NONE) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIND, 1, 0, 60) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.WEIGHT, 50, 0, 120) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/tidal_slash.lua b/scripts/actions/mobskills/tidal_slash.lua index 8884813cc3e..04f6cdb0130 100644 --- a/scripts/actions/mobskills/tidal_slash.lua +++ b/scripts/actions/mobskills/tidal_slash.lua @@ -3,7 +3,7 @@ -- Family: Lamia -- Description: Deals physical damage to enemies in front of mob. -- Notes: Only used when wielding a spear. --- Zanshin auto attack can proc on this. +-- Zanshin auto attack can proc on this. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -22,15 +22,14 @@ end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) local params = {} - -- TODO: This is a physical skill, will fix in mobPhysicalMove() PR params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 params.fTP = { 1.5, 1.5, 1.5 } - params.element = xi.element.WATER - params.attackType = xi.attackType.MAGICAL - params.damageType = xi.damageType.WATER + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 - local info = xi.mobskills.mobMagicalMove(mob, target, skill, action, params) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) if xi.mobskills.processDamage(mob, target, skill, action, info) then target:takeDamage(info.damage, mob, info.attackType, info.damageType) diff --git a/scripts/actions/mobskills/tortoise_stomp.lua b/scripts/actions/mobskills/tortoise_stomp.lua index fceccb3d946..478c1b49d18 100644 --- a/scripts/actions/mobskills/tortoise_stomp.lua +++ b/scripts/actions/mobskills/tortoise_stomp.lua @@ -1,9 +1,8 @@ ----------------------------------- --- Tortoise Stomp --- Description: Single target Defense Down xi.effect. --- Type: Physical --- Utsusemi/Blink absorb: ?? --- Range: Varying Area of Effect +-- Tortoise Stomp +-- Family: Adamantoise +-- Description: Deals physical damage. Additional Effect: Defense Down +-- Note: AoE type may vary depending on NM ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,17 +12,27 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - local duration = math.random(120, 180) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.DEFENSE_DOWN, 25, 0, duration) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + -- Note: ShadowBehavior may vary depending on AoE Type(May vary between NMs) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + -- TODO: Random, resisted, or scales with TP? + local duration = math.random(120, 180) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.DEFENSE_DOWN, 25, 0, duration) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/touchdown_bahamut.lua b/scripts/actions/mobskills/touchdown_bahamut.lua index cffe5fe64e1..a98f5f727ba 100644 --- a/scripts/actions/mobskills/touchdown_bahamut.lua +++ b/scripts/actions/mobskills/touchdown_bahamut.lua @@ -1,7 +1,7 @@ ----------------------------------- -- Touchdown -- Family: Bahamut --- Description: Deals magical damage to enemies in an area of effect. +-- Description: Deals physical damage to enemies in an area of effect. -- Further Notes: Bahamut can use this as a regular move at will. ----------------------------------- ---@type TMobSkill @@ -14,15 +14,14 @@ end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) local params = {} - -- TODO: Jimmayus spreadsheet says this is physical. Handle in mobPhysicalMove() PR - params.baseDamage = mob:getMainLvl() + 2 - params.fTP = { 1.50, 1.50, 1.50 } - params.element = xi.element.NONE - params.attackType = xi.attackType.MAGICAL - params.damageType = xi.damageType.NONE + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING params.shadowBehavior = xi.mobskills.shadowBehavior.WIPE_SHADOWS - local info = xi.mobskills.mobMagicalMove(mob, target, skill, action, params) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) if xi.mobskills.processDamage(mob, target, skill, action, info) then target:takeDamage(info.damage, mob, info.attackType, info.damageType) diff --git a/scripts/actions/mobskills/tourbillion.lua b/scripts/actions/mobskills/tourbillion.lua index da4889d06f6..48819ec7b7e 100644 --- a/scripts/actions/mobskills/tourbillion.lua +++ b/scripts/actions/mobskills/tourbillion.lua @@ -1,31 +1,38 @@ ----------------------------------- --- Tourbillion --- --- Description: Delivers an area attack. Additional effect duration varies with TP. Additional effect: Weakens defense. --- Type: Physical --- Shadow per hit --- Range: Unknown range --- Note: Can only be used with wings up +-- Tourbillion +-- Family: Khimaira +-- Description: Delivers an area attack. Additional Effect: Defense Down +-- Note: Can only be used with wings up ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - return mob:getAnimationSub() == 0 and 0 or 1 -- wings up + return mob:getAnimationSub() == 0 and 0 or 1 -- Wings up end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 1.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - local duration = 20 * (skill:getTP() / 1000) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.DEFENSE_DOWN, 20, 0, duration) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 -- TODO: Capture numHits + params.fTP = { 1.5, 1.5, 1.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + -- TODO: Confirm AoE type (On mob vs on target. Radial or conal) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + -- TODO: Capture power/duration + local duration = xi.mobskills.calculateDuration(mob:getTP(), 20, 60) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.DEFENSE_DOWN, 20, 0, duration) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/toxic_pick.lua b/scripts/actions/mobskills/toxic_pick.lua index 506aaa5cac5..f91839f7c9b 100644 --- a/scripts/actions/mobskills/toxic_pick.lua +++ b/scripts/actions/mobskills/toxic_pick.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Toxic Pick --- Description: Deals damage to a single target. Additional effect: poison, plague & gravity --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Toxic Pick +-- Family: Cockatrice +-- Description: Deals damage to a single target. Additional Effect: Gravity, Plague, Poison ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,19 +11,27 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.0 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) - local power = mob:getMainLvl() / 2 - - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.POISON, power, 3, 180) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.PLAGUE, 5, 0, 60) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.WEIGHT, 75, 0, 120) - - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + local power = mob:getMainLvl() / 2 + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.POISON, power, 3, 180) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PLAGUE, 5, 0, 60) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.WEIGHT, 75, 0, 120) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/train_fall.lua b/scripts/actions/mobskills/train_fall.lua index b1b2013dbeb..247871bd0d4 100644 --- a/scripts/actions/mobskills/train_fall.lua +++ b/scripts/actions/mobskills/train_fall.lua @@ -1,8 +1,8 @@ ----------------------------------- -- Train Fall --- Used by NM Tres Duendes --- Description: Deals 600% physical damage. Additional effect: HP Drain. --- Type: Physical Drain +-- Family: Bat (Bat Trio) +-- Description: Deals 600% physical damage. Additional Effect: HP Drain. +-- Notes: Used by NM Tres Duendes ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,15 +12,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 6 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - skill:setMsg(xi.mobskills.mobPhysicalDrainMove(mob, target, skill, xi.mobskills.drainType.HP, dmg)) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 6.0, 6.0, 6.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.skipPDIF = true - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + skill:setMsg(xi.mobskills.mobDrainMove(mob, target, xi.mobskills.drainType.HP, info.damage)) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/trample.lua b/scripts/actions/mobskills/trample.lua index 76de5c1dfeb..e381e6f4f8a 100644 --- a/scripts/actions/mobskills/trample.lua +++ b/scripts/actions/mobskills/trample.lua @@ -1,9 +1,7 @@ ----------------------------------- -- Trample -- Family: Bahamut --- Description: Deals physical damage to enemies in an area of effect. Additional effect: Knockback + Bind --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows +-- Description: Deals physical damage to enemies in an area of effect. Additional Effect: Bind, Knockback ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,16 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local duration = 30 - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BIND, 1, 0, duration) - - local numhits = 1 - local accmod = 1 - local ftp = 3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_3) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + -- TODO: Capture if conal or radial AoE + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIND, 1, 0, 60) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/trebuchet.lua b/scripts/actions/mobskills/trebuchet.lua index 8a57ab6a916..4ee0438acc8 100644 --- a/scripts/actions/mobskills/trebuchet.lua +++ b/scripts/actions/mobskills/trebuchet.lua @@ -1,5 +1,8 @@ ----------------------------------- -- Trebuchet +-- Family: Gigas +-- Description: Delivers a ranged attack to a single target. +-- Notes: Used by some Gigas as a stronger version of Catapult. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -9,14 +12,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local dmgmod = 1.6 + local params = {} - local info = xi.mobskills.mobRangedMove(mob, target, skill, numhits, accmod, dmgmod, xi.mobskills.magicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.RANGED, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.RANGED, xi.damageType.BLUNT) - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.6, 1.6, 1.6 } -- TODO: Capture fTPs + params.attackType = xi.attackType.RANGED + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.skipParry = true + params.skipGuard = true + params.skipBlock = true + + local info = xi.mobskills.mobRangedMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/trembling.lua b/scripts/actions/mobskills/trembling.lua index 8ec53b83767..70978f177ca 100644 --- a/scripts/actions/mobskills/trembling.lua +++ b/scripts/actions/mobskills/trembling.lua @@ -1,10 +1,7 @@ ----------------------------------- --- Trembling --- --- Description: Deals physical damage to enemies within an area of effect. Additional effect: Dispel --- Type: Physical --- Utsusemi/Blink absorb: Absorbed by 3 shadows. --- Range: 10' radial +-- Trembling +-- Family: Hydra +-- Description: Deals physical damage to enemies within an area of effect. Additional Effect: Dispel ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,23 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 4 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, xi.mobskills.shadowBehavior.NUMSHADOWS_3) - local dispelled = math.random(2, 3) - - if info.hitslanded ~= 0 then - for i = 1, dispelled do - target:dispelStatusEffect() - end - end + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 4.0, 4.0, 4.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - -- TODO: Dispelled messages. No examples of damage+dispel working to crib notes from. + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + target:dispelStatusEffect() + end - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/tremorous_tread.lua b/scripts/actions/mobskills/tremorous_tread.lua index 902a86f443c..d0db023b991 100644 --- a/scripts/actions/mobskills/tremorous_tread.lua +++ b/scripts/actions/mobskills/tremorous_tread.lua @@ -1,10 +1,7 @@ ----------------------------------- --- Tremorous Tread --- --- Description: Deals damage to players in an area of effect. Additional effect: Stun --- Type: Physical --- 2-3 Shadows --- Range: Unknown +-- Tremorous Tread +-- Family: Mammet +-- Description: Deals damage to targets in an area of effect. Additional Effect: Stun ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,17 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_2) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 -- TODO: Capture shadowBehavior - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 3) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 3) -- TODO: Capture stun duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/tribulation.lua b/scripts/actions/mobskills/tribulation.lua index 1e717d3fa2f..ac1ebfd5f2d 100644 --- a/scripts/actions/mobskills/tribulation.lua +++ b/scripts/actions/mobskills/tribulation.lua @@ -17,7 +17,7 @@ end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) local typeEffect = nil local blinded = xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BLINDNESS, 20, 0, 120) - local bio = xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIO, 39, 0, 120) + local bio = xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIO, 39, 0, 120) -- TODO: Capture ATTP reduction skill:setMsg(xi.msg.basic.SKILL_ENFEEB_IS) diff --git a/scripts/actions/mobskills/triclip.lua b/scripts/actions/mobskills/triclip.lua index 4b480b18ae2..d0b018e86b3 100644 --- a/scripts/actions/mobskills/triclip.lua +++ b/scripts/actions/mobskills/triclip.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Triclip --- Description: Deals damage in a threefold attack. Additional effect: DEX Down --- Type: Physical --- Utsusemi/Blink absorb: 3 shadows --- Range: Melee +-- Triclip +-- Family: Tauri +-- Description: Delivers a threefold attack. Additional Effect: DEX Down ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,19 +11,27 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 0.8 - local ftp = 0.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 + params.fTP = { 0.5, 0.5, 0.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 + -- TODO: Possible accuracy modifier - -- Power is 10 at 1000 TP, 20 at 3000 TP - local power = 5 + math.floor(skill:getTP() / 200) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.DEX_DOWN, power, 3, 90) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + -- Power is 10 at 1000 TP, 20 at 3000 TP + local power = 5 + math.floor(skill:getTP() / 200) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.DEX_DOWN, power, 9, 90) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/true_strike.lua b/scripts/actions/mobskills/true_strike.lua index 386f0cc7818..15a0d3eaca0 100644 --- a/scripts/actions/mobskills/true_strike.lua +++ b/scripts/actions/mobskills/true_strike.lua @@ -1,10 +1,7 @@ ----------------------------------- -- True Strike --- +-- Family: Humanoid Club Weaponskill -- Description: Deals critical damage. Accuracy varies with TP. --- Type: Physical --- Utsusemi/Blink absorb: 1 Shadow --- Range: Melee ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,14 +12,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 0.6 - local ftp = 3.0 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ACC_VARIES, 1.1, 1.2, 1.3) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + -- TODO: Accuracy modifier + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/tusk.lua b/scripts/actions/mobskills/tusk.lua index 2307d55fc37..4c6d1268634 100644 --- a/scripts/actions/mobskills/tusk.lua +++ b/scripts/actions/mobskills/tusk.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Tusk --- Deals damage to a single target. Additional effect: Knockback +-- Family: Bugard +-- Description: Deals damage to a single target. Additional Effect: Knockback ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/twirling_dervish.lua b/scripts/actions/mobskills/twirling_dervish.lua index 71f9ce4208a..40303ded715 100644 --- a/scripts/actions/mobskills/twirling_dervish.lua +++ b/scripts/actions/mobskills/twirling_dervish.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Twirling Dervish --- Deals damage in an area of effect. +-- Family: Humanoid (Adelheid Sturm) +-- Description: Deals damage in an area of effect. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,13 +11,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 2 - local ftp = 6 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local params = {} + + -- TODO: Magical or physical? + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 6.0, 6.0, 6.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/typhoon.lua b/scripts/actions/mobskills/typhoon.lua index e62bbe25c94..b123afcf91a 100644 --- a/scripts/actions/mobskills/typhoon.lua +++ b/scripts/actions/mobskills/typhoon.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Typhoon --- Description: Spins around dealing damage to targets in an area of effect. --- Type: Physical --- Utsusemi/Blink absorb: 1-2 Shadows --- Range: 10' radial +-- Typhoon +-- Family: Doll +-- Description: Spins around dealing damage to targets in an area of effect. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,14 +11,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 2 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) + local params = {} - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 2 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_4 + -- TODO: Faust may have a modified shadowBehavior Need captures to parse. + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/umbra_smash.lua b/scripts/actions/mobskills/umbra_smash.lua index a26cfe367bc..07d52e3cf37 100644 --- a/scripts/actions/mobskills/umbra_smash.lua +++ b/scripts/actions/mobskills/umbra_smash.lua @@ -1,11 +1,13 @@ ----------------------------------- -- Umbra Smash +-- Family: Shadow Lord +-- Description: Deals physical damage to a targets in range. Target Centered AOE? ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - if mob:getAnimationSub() == 1 then + if mob:getAnimationSub() == 1 then -- Used in melee form only return 1 else return 0 @@ -13,13 +15,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.HTH, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.HTH) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/unblest_jambiya.lua b/scripts/actions/mobskills/unblest_jambiya.lua index 6ab3226e140..cbb2309c1ab 100644 --- a/scripts/actions/mobskills/unblest_jambiya.lua +++ b/scripts/actions/mobskills/unblest_jambiya.lua @@ -2,9 +2,6 @@ -- Unblest Jambiya -- Family: Qutrub -- Description: Steals HP from targets in an area of effect. --- Type: Magical --- Utsusemi/Blink absorb: Wipes shadows --- Range: AoE 15' -- Notes: Used only by certain NM's when their primary sword isn't broken. ----------------------------------- ---@type TMobSkill @@ -21,18 +18,17 @@ end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) local params = {} - -- TODO: This is a physical skill. Will fix in mobPhysicalMove() PR params.baseDamage = mob:getWeaponDmg() - params.fTP = { 2.00, 2.00, 2.00 } - params.element = xi.element.DARK - params.attackType = xi.attackType.MAGICAL - params.damageType = xi.damageType.DARK + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING params.shadowBehavior = xi.mobskills.shadowBehavior.WIPE_SHADOWS -- TODO: Capture shadowBehavior - local info = xi.mobskills.mobMagicalMove(mob, target, skill, action, params) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) if xi.mobskills.processDamage(mob, target, skill, action, info) then - skill:setMsg(xi.mobskills.mobPhysicalDrainMove(mob, target, skill, xi.mobskills.drainType.HP, info.damage)) + skill:setMsg(xi.mobskills.mobDrainMove(mob, target, xi.mobskills.drainType.HP, info.damage)) end return info.damage diff --git a/scripts/actions/mobskills/uppercut.lua b/scripts/actions/mobskills/uppercut.lua index a2be8dd68bc..239f288ccdd 100644 --- a/scripts/actions/mobskills/uppercut.lua +++ b/scripts/actions/mobskills/uppercut.lua @@ -1,10 +1,7 @@ ----------------------------------- -- Uppercut --- Deals damage to a single target. --- Type: Physical --- Can be dispelled: N/A --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Family: Goobbue +-- Description: Deals damage to a single target. Additional Effect: Knockback ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,14 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ATK_VARIES, 2.0, 2.0, 2.0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.attackMultiplier = { 2.0, 2.0, 2.0 } + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/uranos_cascade_eta.lua b/scripts/actions/mobskills/uranos_cascade_eta.lua index 96a52777c21..94339621400 100644 --- a/scripts/actions/mobskills/uranos_cascade_eta.lua +++ b/scripts/actions/mobskills/uranos_cascade_eta.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Uranos Cascade: Eta --- Deals damage in an area of effect. +-- Family: Exoplates +-- Description: Deals damage in an area of effect. Additional Effect: Bind ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,17 +15,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.75 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_2) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.75, 1.75, 1.75 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 -- TODO: Capture shadowBehavior - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BIND, 1, 0, 10) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIND, 1, 0, 10) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/uranos_cascade_lambda.lua b/scripts/actions/mobskills/uranos_cascade_lambda.lua index 87e9813392e..d5bc7c1dae3 100644 --- a/scripts/actions/mobskills/uranos_cascade_lambda.lua +++ b/scripts/actions/mobskills/uranos_cascade_lambda.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Uranos Cascade: Theta --- Deals damage in an area of effect. +-- Family: Exoplates +-- Description: Deals damage in an area of effect. Additional Effect: Bind ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,16 +15,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.75 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_2) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.75, 1.75, 1.75 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BIND, 1, 0, 10) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIND, 1, 0, 10) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/uranos_cascade_theta.lua b/scripts/actions/mobskills/uranos_cascade_theta.lua index 4b0e1667e61..adc33dc1d59 100644 --- a/scripts/actions/mobskills/uranos_cascade_theta.lua +++ b/scripts/actions/mobskills/uranos_cascade_theta.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Uranos Cascade: Theta --- Deals damage in an area of effect. +-- Family: Exoplates +-- Deals damage in an area of effect. Additional Effect: Bind ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,17 +15,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_2) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.50, 1.50, 1.50 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BIND, 1, 0, 10) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIND, 1, 0, 10) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/vampiric_lash.lua b/scripts/actions/mobskills/vampiric_lash.lua index bfb5b8948d0..a1a4e632018 100644 --- a/scripts/actions/mobskills/vampiric_lash.lua +++ b/scripts/actions/mobskills/vampiric_lash.lua @@ -1,9 +1,7 @@ ----------------------------------- -- Vampiric Lash --- Description: Deals 200% physical damage to a single target. Additional effect: Drain --- Type: Magical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Family: Morbol +-- Description: Deals 200% physical damage to a single target. Additional Effect: HP Drain -- Notes: (Unverified) In ToAU zones, this has an additional effect of absorbing all status effects. -- (Verified) Will not absorb food in ToAU zones. ----------------------------------- @@ -15,16 +13,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, 1, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local damage = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) + local params = {} - target:takeDamage(damage, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) + params.baseDamage = mob:getWeaponDmg() -- TODO: Capture baseDamage + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.skipPDIF = true - skill:setMsg(xi.mobskills.mobPhysicalDrainMove(mob, target, skill, xi.mobskills.drainType.HP, damage)) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return damage + if xi.mobskills.processDamage(mob, target, skill, action, info) then + skill:setMsg(xi.mobskills.mobDrainMove(mob, target, xi.mobskills.drainType.HP, info.damage)) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/vampiric_root.lua b/scripts/actions/mobskills/vampiric_root.lua index 0546750de69..2085128521a 100644 --- a/scripts/actions/mobskills/vampiric_root.lua +++ b/scripts/actions/mobskills/vampiric_root.lua @@ -17,16 +17,15 @@ end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) local params = {} - -- TODO: This is a physical skill. Will fix in mobPhysicalMove() PR params.baseDamage = mob:getWeaponDmg() - params.fTP = { 2.00, 2.00, 2.00 } - params.element = xi.element.DARK - params.attackType = xi.attackType.MAGICAL - params.damageType = xi.damageType.DARK - params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS -- TODO: Capture shadowBehavior - -- Note: Ignores PDIF - - local info = xi.mobskills.mobMagicalMove(mob, target, skill, action, params) + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS + params.skipPDIF = true + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) if xi.mobskills.processDamage(mob, target, skill, action, info) then skill:setMsg(xi.mobskills.mobDrainMove(mob, target, xi.mobskills.drainType.HP, info.damage)) diff --git a/scripts/actions/mobskills/vanity_dive.lua b/scripts/actions/mobskills/vanity_dive.lua index 363a4ddc774..e8b585b6450 100644 --- a/scripts/actions/mobskills/vanity_dive.lua +++ b/scripts/actions/mobskills/vanity_dive.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Vanity Dive --- Deals damage to a single target. +-- Family: Wanderer +-- Description: Deals damage to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/vanity_drive.lua b/scripts/actions/mobskills/vanity_drive.lua index fc6dc4cd542..5f519edec44 100644 --- a/scripts/actions/mobskills/vanity_drive.lua +++ b/scripts/actions/mobskills/vanity_drive.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Vanity Drive --- Deals damage to a single target. +-- Family: Gorger +-- Description: Deals conal AoE physical damage to targets in front of mob ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/vanity_strike.lua b/scripts/actions/mobskills/vanity_strike.lua index c59b8c3cc50..0e9c8b039b5 100644 --- a/scripts/actions/mobskills/vanity_strike.lua +++ b/scripts/actions/mobskills/vanity_strike.lua @@ -1,7 +1,7 @@ ----------------------------------- --- Vanity Strike --- Description: Damage varies with TP. Additional effect: "Stun." --- Type: Physical (Blunt) +-- Vanity Strike +-- Family: Seether +-- Description: Deals damage to a single target. Additional Effect: Stun ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,18 +11,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 4) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) -- TODO: Capture stun duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/velocious_blade.lua b/scripts/actions/mobskills/velocious_blade.lua index 15c973caa17..6fae9442188 100644 --- a/scripts/actions/mobskills/velocious_blade.lua +++ b/scripts/actions/mobskills/velocious_blade.lua @@ -1,15 +1,13 @@ ----------------------------------- --- Velocious Blade --- --- Description: Deals a fivefold attack against the target. --- Type: Physical --- Range: Unknown +-- Velocious Blade +-- Family: Mammet +-- Description: Deals a fivefold attack against the target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) - if mob:getAnimationSub() == 1 then + if mob:getAnimationSub() == 1 then -- Used in sword form return 0 end @@ -17,14 +15,23 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 5 - local accmod = 0.8 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_2) - - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 5 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_5 -- TODO: Capture shadowBehavior + -- params.accuracyModifier = { 0, 0, 0 } -- TODO: Capture accuracy modifier + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/venom_sting.lua b/scripts/actions/mobskills/venom_sting.lua index e68719e0d32..10c1f1e6267 100644 --- a/scripts/actions/mobskills/venom_sting.lua +++ b/scripts/actions/mobskills/venom_sting.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Venom Sting --- Deals physical damage to a single target. Additional Effect: Poison +-- Family: Scorpion +-- Description: Deals physical damage to a single target. Additional Effect: Poison ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,17 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.POISON, 100, 3, 30) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + -- TODO: The poison power likely has some form of level scaling. + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.POISON, 100, 3, 30) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/vertical_cleave.lua b/scripts/actions/mobskills/vertical_cleave.lua index 164a9ea6bf6..001ae276e92 100644 --- a/scripts/actions/mobskills/vertical_cleave.lua +++ b/scripts/actions/mobskills/vertical_cleave.lua @@ -1,7 +1,7 @@ ----------------------------------- --- Vertical Cleave --- Description: Damage varies with TP. --- Type: Physical (Slashing) +-- Vertical Cleave +-- Family: Euvhi +-- Description: Deals physical damage to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,14 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2 - -- TODO: Add ability to crit - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ATK_VARIES, 1.25, 1.25, 1.25) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.attackMultiplier = { 1.25, 1.25, 1.25 } + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/vertical_slash.lua b/scripts/actions/mobskills/vertical_slash.lua index 183e934d84c..c4cf67d6af8 100644 --- a/scripts/actions/mobskills/vertical_slash.lua +++ b/scripts/actions/mobskills/vertical_slash.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Vertical Slash --- Description: Vertically slashes a single target. Additional effect: Accuracy Down --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Vertical Slash +-- Family: Tonberry +-- Description: Deals physical damage to a single target. Additional Effect: Accuracy Down ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 2 - local ftp = 1.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.ACCURACY_DOWN, 100, 0, 30) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.ACCURACY_DOWN, 100, 0, 30) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/vicious_claw.lua b/scripts/actions/mobskills/vicious_claw.lua index 77e4c1635c3..1fdb5a042e0 100644 --- a/scripts/actions/mobskills/vicious_claw.lua +++ b/scripts/actions/mobskills/vicious_claw.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Vicious Claw --- Description: Slashes up a single target. --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Melee +-- Vicious Claw +-- Family: Opo-opo +-- Description: Deals physical damage to a single target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 3.0, 3.0, 3.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/victory_beacon.lua b/scripts/actions/mobskills/victory_beacon.lua index eb3a8bb2b62..760958e0f4c 100644 --- a/scripts/actions/mobskills/victory_beacon.lua +++ b/scripts/actions/mobskills/victory_beacon.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Victory Beacon --- Used by Rughadjeen (Trust) +-- Family: Humanoid (Rughadjeen) +-- Description: ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 4 - local ftp = 5 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 5.0, 5.0, 5.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/victory_smite.lua b/scripts/actions/mobskills/victory_smite.lua index b8463d710cb..a7248ac7c26 100644 --- a/scripts/actions/mobskills/victory_smite.lua +++ b/scripts/actions/mobskills/victory_smite.lua @@ -1,7 +1,7 @@ ----------------------------------- -- Victory Smite --- Description: Delivers a fourfold attack. Chance of params.critical hit varies with TP. --- Type: Physical +-- Family: Humanoid Hand to Hand Weaponskill +-- Description: Delivers a fourfold attack. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,14 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 4 - local accmod = 1 - local ftp = 2.25 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.CRIT_VARIES, 1.1, 1.25, 1.45) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.HTH, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.HTH) - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 4 + params.fTP = { 2.25, 2.25, 2.25 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.HTH + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_4 + -- params.canCrit = true + -- params.criticalChance = { 0.0, 0.0, 0.0 } -- TODO: Capture crit rate + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/voiceless_storm.lua b/scripts/actions/mobskills/voiceless_storm.lua index 86e97bfe026..e7fb17d8fbf 100644 --- a/scripts/actions/mobskills/voiceless_storm.lua +++ b/scripts/actions/mobskills/voiceless_storm.lua @@ -26,7 +26,7 @@ mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) if xi.mobskills.processDamage(mob, target, skill, action, info) then target:takeDamage(info.damage, mob, info.attackType, info.damageType) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.SILENCE, 1, 0, 120) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.SILENCE, 1, 0, 120) end return info.damage diff --git a/scripts/actions/mobskills/vorpal_blade.lua b/scripts/actions/mobskills/vorpal_blade.lua index 3d2706ca89a..333c76d207b 100644 --- a/scripts/actions/mobskills/vorpal_blade.lua +++ b/scripts/actions/mobskills/vorpal_blade.lua @@ -1,15 +1,14 @@ ----------------------------------- -- Vorpal Blade --- +-- Family: Humanoid Sword Weaponskill -- Description: Delivers a four-hit attack. Chance of critical varies with TP. --- Type: Physical --- Utsusemi/Blink absorb: Shadow per hit --- Range: Melee ----------------------------------- ---@type TMobSkill local mobskillObject = {} mobskillObject.onMobSkillCheck = function(target, mob, skill) + -- TODO: Split this into a file for each mob family + -- Handle Ghrah family humanoid form. -- If not in Paladin form, then ignore. if @@ -35,19 +34,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 4 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_4 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + if mob:getPool() == xi.mobPool.THRONE_ROOM_VOLKER then -- Volker@Throne_Room only target:showText(mob, zones[xi.zone.THRONE_ROOM].text.BLADE_ANSWER) end - local numhits = 4 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - - -- AA EV: Approx 900 damage to 75 DRG/35 THF. 400 to a NIN/WAR in Arhat, but took shadows. - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/vorpal_scythe.lua b/scripts/actions/mobskills/vorpal_scythe.lua index 8229bbdd8a7..51a4f8c3301 100644 --- a/scripts/actions/mobskills/vorpal_scythe.lua +++ b/scripts/actions/mobskills/vorpal_scythe.lua @@ -1,8 +1,7 @@ ----------------------------------- -- Vorpal Scythe --- Delivers a single-hit attack --- Type: Physical --- Range: Melee +-- Family: Humanoid Scythe Weaponskill +-- Description: Delivers a single-hit attack ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/vorpal_wheel.lua b/scripts/actions/mobskills/vorpal_wheel.lua index ed9bf211acf..87a7cf9f742 100644 --- a/scripts/actions/mobskills/vorpal_wheel.lua +++ b/scripts/actions/mobskills/vorpal_wheel.lua @@ -1,11 +1,8 @@ ----------------------------------- --- Vorpal Wheel --- --- Description: Throws a slicing wheel at a single target. --- Type: Physical --- Utsusemi/Blink absorb: No --- Range: Unknown --- Notes: Only used by Gulool Ja Ja, and will use it as a counterattack to any spells cast on him. Damage increases as his health drops. Can be Shield Blocked. +-- Vorpal Wheel +-- Family: Mamool Ja +-- Description: Throws a slicing wheel at a single target. +-- Notes: Used by Gulool Ja Ja, and will use it as a counterattack to any spells cast on him. Damage increases as his health drops. Can be Shield Blocked. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,14 +12,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 + local params = {} + -- Increase damage as health drops - local ftp = (1 - (mob:getHP() / mob:getMaxHP())) * 6 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local fTP = (1 - (mob:getHP() / mob:getMaxHP())) * 6 + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { fTP, fTP, fTP } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/vortex.lua b/scripts/actions/mobskills/vortex.lua index 5afcc657eac..419c2fb68e5 100644 --- a/scripts/actions/mobskills/vortex.lua +++ b/scripts/actions/mobskills/vortex.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Vortex --- Creates a vortex that damages targets in an area of effect. Additional effect: Terror +-- Family: Ealdnarche +-- Description: Creates a vortex that damages targets in an area of effect. Additional Effect: Terror ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,22 +11,30 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 -- fTP and fTP scaling unknown. TODO: capture ftp - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_3) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior (JP Wiki says Ignores shadows) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.TERROR, 1, 0, 9) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BIND, 1, 0, 30) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - if not target:isTrust() then + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + -- TODO: Capture duration of effects + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.TERROR, 1, 0, 9) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIND, 1, 0, 30) + + -- TODO: Capture hate reset type (Enmity wipe vs enmity turned off) + -- See Antica skill "Sand Trap" for reference mob:resetEnmity(target) end - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/walk_the_plank.lua b/scripts/actions/mobskills/walk_the_plank.lua index 5ec84b91649..c5360b33335 100755 --- a/scripts/actions/mobskills/walk_the_plank.lua +++ b/scripts/actions/mobskills/walk_the_plank.lua @@ -1,7 +1,7 @@ ----------------------------------- --- Walk the Plank (Lion) --- AoE Damage, Bind, Knockback, dispel --- Type: Physical (AoE) +-- Walk the Plank +-- Family: Humanoid (Lion) +-- Description: AoE Damage, Bind, Knockback, dispel -- Skillchain Properties: Light/Distortion ----------------------------------- ---@type TMobSkill @@ -12,18 +12,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 2 - local ftp = 0.3 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, mob:getWeaponDmg() * ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) + local params = {} - target:dispelStatusEffect() - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 0.3, 0.3, 0.3 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BIND, 1, 0, 20) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIND, 1, 0, 20) -- TODO: Capture duration + + target:dispelStatusEffect() + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/wanion.lua b/scripts/actions/mobskills/wanion.lua index ee59134dd07..393bc78314b 100644 --- a/scripts/actions/mobskills/wanion.lua +++ b/scripts/actions/mobskills/wanion.lua @@ -22,6 +22,7 @@ mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) local currentEffect = mob:getStatusEffect(effect) if currentEffect then + -- TODO: Bio needs subPower copied over as well for the ATTP reduction. xi.mobskills.mobStatusEffectMove(mob, target, effect, currentEffect:getPower(), currentEffect:getTick(), currentEffect:getTimeRemaining() / 1000) mob:delStatusEffect(effect) end diff --git a/scripts/actions/mobskills/warped_wail.lua b/scripts/actions/mobskills/warped_wail.lua index eb10f83edfc..f0f2f53e47b 100644 --- a/scripts/actions/mobskills/warped_wail.lua +++ b/scripts/actions/mobskills/warped_wail.lua @@ -28,8 +28,8 @@ mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) -- TODO Capture power/duration of HP/MP Down. -- From found battle footage, it looks to be around 10-15%. (Hard to tell exact since player was gear swapping). - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.MAX_HP_DOWN, 50, 0, 300) - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.MAX_MP_DOWN, 50, 0, 300) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.MAX_HP_DOWN, 50, 0, 300) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.MAX_MP_DOWN, 50, 0, 300) end return info.damage diff --git a/scripts/actions/mobskills/wheeling_thrust.lua b/scripts/actions/mobskills/wheeling_thrust.lua index ba244201131..33637b29df9 100644 --- a/scripts/actions/mobskills/wheeling_thrust.lua +++ b/scripts/actions/mobskills/wheeling_thrust.lua @@ -1,8 +1,7 @@ ----------------------------------- -- Wheeling Thrust --- Delivers a two-hit attack --- Type: Physical --- Range: Melee +-- Family: Humanoid Polearm Weaponskill +-- Description: Deals physical damage to a target. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -12,15 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.75 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.75, 1.75, 1.75 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/whip_tongue.lua b/scripts/actions/mobskills/whip_tongue.lua index ed1dc8e1dac..7428a57d6f2 100644 --- a/scripts/actions/mobskills/whip_tongue.lua +++ b/scripts/actions/mobskills/whip_tongue.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Whip Tongue --- Description: Whiplashes a single target with its tongue. Additional effect: Stun --- Type: Physical --- Utsusemi/Blink absorb: 1 shadow --- Range: Unknown +-- Whip Tongue +-- Family: Doomed +-- Description: Deals physical damage to a target. Additional Effect: Stun ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,18 +11,26 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1.5 - local params = { canCrit = true } - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0, params) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.5, 1.5, 1.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 + params.canCrit = true + params.criticalChance = { 0.10, 0.20, 0.25 } -- TODO: Capture crit rate - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 4) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) -- TODO: Capture stun duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/whirl_claws.lua b/scripts/actions/mobskills/whirl_claws.lua index e1ba18f8da8..08247845b59 100644 --- a/scripts/actions/mobskills/whirl_claws.lua +++ b/scripts/actions/mobskills/whirl_claws.lua @@ -1,7 +1,7 @@ ----------------------------------- -- Whirl Claws --- Deals damage in an area of effect. --- 100% TP: ??? / 200% TP: ??? / 300% TP: ??? +-- Family: Rabbit +-- Description: Deals damage in an area of effect. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 2.0 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_3) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/whirl_of_rage.lua b/scripts/actions/mobskills/whirl_of_rage.lua index 290c6f1416e..9761bec541b 100644 --- a/scripts/actions/mobskills/whirl_of_rage.lua +++ b/scripts/actions/mobskills/whirl_of_rage.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Whirl of Rage --- Delivers an area attack that stuns enemies. Damage varies with TP. +-- Family: Evil Weapon +-- Description: Deals AoE physical damage to targets in range of mob. Additional Effect: Stun ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded * math.random(2, 3)) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_4 - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 4) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) -- TODO: Capture stun duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/wild_horn.lua b/scripts/actions/mobskills/wild_horn.lua index 35addb4afaa..d05d7463d1e 100644 --- a/scripts/actions/mobskills/wild_horn.lua +++ b/scripts/actions/mobskills/wild_horn.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Wild Horn --- Description: Deals damage in a frontal cone. --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows --- Range: Unknown cone +-- Wild Horn +-- Family: Behemoth +-- Description: Deals physical damage in a frontal cone. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -17,13 +15,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 3 - local accmod = 1 - local ftp = 1.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 3 -- TODO: Capture numHits + params.fTP = { 1.5, 1.5, 1.5 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/wild_oats.lua b/scripts/actions/mobskills/wild_oats.lua index 64382de14f0..801478b41e1 100644 --- a/scripts/actions/mobskills/wild_oats.lua +++ b/scripts/actions/mobskills/wild_oats.lua @@ -1,7 +1,7 @@ ----------------------------------- --- Wild Oats --- Description: Additional effect: Vitality Down. Duration of effect varies on TP. --- Type: Physical (Piercing) +-- Wild Oats +-- Family: Mandragora +-- Description: Deals physical damage to a single target. Additional Effect: VIT Down ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -11,17 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.PIERCING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.PIERCING) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 1.0, 1.0, 1.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1 - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.VIT_DOWN, 10, 3, 120) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - return dmg + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.VIT_DOWN, 10, 9, 120) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/wild_rage.lua b/scripts/actions/mobskills/wild_rage.lua index 3e778567854..1e04fffc81d 100644 --- a/scripts/actions/mobskills/wild_rage.lua +++ b/scripts/actions/mobskills/wild_rage.lua @@ -1,11 +1,8 @@ ----------------------------------- --- Wild Rage --- --- Description: Deals physical damage to enemies within area of effect. --- Type: Physical --- Utsusemi/Blink absorb: 2-3 shadows --- Range: 15' radial --- Notes: Has additional effect of Poison when used by King Vinegarroon. +-- Wild Rage +-- Family: Scorpion +-- Description: Deals physical damage to enemies within area of effect. +-- Notes: Has additional effect of Poison when used by King Vinegarroon. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -15,27 +12,37 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 1 - local fTP = 2.0 + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_3 -- TODO: Capture shadowBehavior if mob:getPool() == xi.mobPool.PLATOON_SCORPION then local battlefield = mob:getBattlefield() if battlefield then - fTP = fTP + battlefield:getLocalVar('scorpionsDefeated') * .5 + local scorpionMultiplier = battlefield:getLocalVar('scorpionsDefeated') * 0.5 + local fTP = 2.0 + scorpionMultiplier + + params.fTP = { fTP, fTP, fTP } end end - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, fTP, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, xi.mobskills.shadowBehavior.NUMSHADOWS_3) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - if mob:getPool() == xi.mobPool.KING_VINEGARROON then - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.POISON, 25, 3, 60) + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + if mob:getPool() == xi.mobPool.KING_VINEGARROON then + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.POISON, 25, 3, 60) + end end - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/wing_slap.lua b/scripts/actions/mobskills/wing_slap.lua index a6565725386..f32ba7105d9 100644 --- a/scripts/actions/mobskills/wing_slap.lua +++ b/scripts/actions/mobskills/wing_slap.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Wing Slap --- Description: Slaps around a single target four times with its wings. Additional effect: Stun --- Type: Physical --- Utsusemi/Blink absorb: 4 shadows --- Range: Melee +-- Wing Slap +-- Family: Apkallu +-- Description: Slaps around a single target four times with its wings. Additional Effect: Stun ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,16 +11,24 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 4 - local accmod = 1 - local ftp = 0.25 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.STUN, 1, 0, 4) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 4 + params.fTP = { 0.25, 0.25, 0.25 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.BLUNT + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_4 - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STUN, 1, 0, 4) -- TODO: Capture stun duration + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/wing_thrust.lua b/scripts/actions/mobskills/wing_thrust.lua index 7408d685cfb..d4fbcbbb0e0 100644 --- a/scripts/actions/mobskills/wing_thrust.lua +++ b/scripts/actions/mobskills/wing_thrust.lua @@ -1,10 +1,7 @@ ----------------------------------- --- Wing Thrust --- Family: Aern --- Type: Physical --- Can be dispelled: N/A --- Utsusemi/Blink absorb: 4 Shadows --- Range: Single Target 7.0' +-- Wing Thrust +-- Family: Aern +-- Description: Delivers a fourfold attack. Additional Effect: Slow ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -14,16 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 4 - local accmod = 1 - local ftp = 0.5 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.ACC_VARIES, 1, 1, 1) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.NONE, info.hitslanded) + local params = {} - xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.SLOW, 1250, 0, math.random(30, 60)) + params.baseDamage = mob:getWeaponDmg() + params.numHits = 4 + params.fTP = { 0.5, 0.5, 0.5 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING -- TODO: Capture damageType + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_4 + -- params.accuracyModifier = { 0, 0, 0 } -- TODO: Accuracy modifier. Reported to be inaccurate - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.NONE) - return dmg + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.SLOW, 3437, 0, math.random(30, 60)) -- TODO: Duration random, resisted or scale with TP? + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/wing_whirl.lua b/scripts/actions/mobskills/wing_whirl.lua index c8995e6b790..16e6f7057df 100644 --- a/scripts/actions/mobskills/wing_whirl.lua +++ b/scripts/actions/mobskills/wing_whirl.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Wing Whirl --- Description: Strikes all targets within an area of effect with its wings. --- Type: Physical --- Utsusemi/Blink absorb: 4 shadows --- Range: Unknown radial +-- Wing Whirl +-- Family: Apkallu +-- Description: Strikes all targets within an area of effect with its wings. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,13 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 4 - local accmod = 1 - local ftp = 1 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + local params = {} + + params.baseDamage = mob:getWeaponDmg() + params.numHits = 4 -- TODO: Capture numHits + params.fTP = { 1.0, 1.0, 1.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_4 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/wire_cutter.lua b/scripts/actions/mobskills/wire_cutter.lua index bf9d2220215..46e47b45064 100644 --- a/scripts/actions/mobskills/wire_cutter.lua +++ b/scripts/actions/mobskills/wire_cutter.lua @@ -1,6 +1,7 @@ ----------------------------------- --- Wire_Cutter --- Single-target damage (~500-1500), absorbed by 2 Utsusemi shadows. +-- Wire Cutter +-- Family: Ultima +-- Description: Single-target damage (~500-1500), absorbed by 2 Utsusemi shadows. ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -10,14 +11,22 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 2 - local accmod = 0.8 - local ftp = 2 - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + local params = {} - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) - return dmg + params.baseDamage = mob:getWeaponDmg() + params.numHits = 2 + params.fTP = { 2.0, 2.0, 2.0 } + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.SLASHING + params.shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_2 -- TODO: Capture shadowBehavior + + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) + + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType) + end + + return info.damage end return mobskillObject diff --git a/scripts/actions/mobskills/zephyr_arrow.lua b/scripts/actions/mobskills/zephyr_arrow.lua index 54e3419c64e..9a1a7190958 100644 --- a/scripts/actions/mobskills/zephyr_arrow.lua +++ b/scripts/actions/mobskills/zephyr_arrow.lua @@ -1,9 +1,7 @@ ----------------------------------- --- Zephyr Arrow --- Description: Deals a ranged attack to target. Additional effect: Knockback and Bind --- Type: Ranged --- Utsusemi/Blink absorb: Ignores Utsusemi --- Range: Unknown +-- Zephyr Arrow +-- Family: Pixie +-- Description: Deals a ranged attack to target. Additional Effect: Bind, Knockback ----------------------------------- ---@type TMobSkill local mobskillObject = {} @@ -13,18 +11,25 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local numhits = 1 - local accmod = 4 - local ftp = 5 -- fTP and fTP scaling unknown. TODO: capture ftp + local params = {} - local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT, 0, 0, 0) - local dmg = xi.mobskills.mobFinalAdjustments(info, mob, skill, target, xi.attackType.RANGED, xi.damageType.PIERCING, xi.mobskills.shadowBehavior.IGNORE_SHADOWS) + -- TODO: Ranged or Physical skill? + params.baseDamage = mob:getWeaponDmg() + params.numHits = 1 + params.fTP = { 5.0, 5.0, 5.0 } -- TODO: Capture fTPs + params.attackType = xi.attackType.PHYSICAL + params.damageType = xi.damageType.PIERCING + params.shadowBehavior = xi.mobskills.shadowBehavior.IGNORE_SHADOWS - target:takeDamage(dmg, mob, xi.attackType.RANGED, xi.damageType.PIERCING, { breakBind = false }) + local info = xi.mobskills.mobPhysicalMove(mob, target, skill, action, params) - xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIND, 1, 0, 120) + if xi.mobskills.processDamage(mob, target, skill, action, info) then + target:takeDamage(info.damage, mob, info.attackType, info.damageType, { breakBind = false }) - return dmg + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIND, 1, 0, 120) -- TODO: Capture duration + end + + return info.damage end return mobskillObject diff --git a/scripts/globals/combat/physical_utilities.lua b/scripts/globals/combat/physical_utilities.lua index eb541a1a47c..3faaa6c7cfc 100644 --- a/scripts/globals/combat/physical_utilities.lua +++ b/scripts/globals/combat/physical_utilities.lua @@ -852,6 +852,17 @@ xi.combat.physical.criticalRateFromStatDiff = function(actor, target) return statBonus end +-- dStat: Ranged critical hit rate bonus from AGI vs AGI difference. +xi.combat.physical.criticalRateFromAGIDiff = function(actor, target) + local statBonus = 0 + + local dAgi = math.max(0, actor:getStat(xi.mod.AGI) - target:getStat(xi.mod.AGI)) + statBonus = math.floor(dAgi / 10) + statBonus = statBonus / 100 + + return statBonus +end + -- Innin: Critical hit rate bonus when actor is behind target. xi.combat.physical.criticalRateFromInnin = function(actor, target) local inninBonus = 0 @@ -948,6 +959,38 @@ xi.combat.physical.calculateSwingCriticalRate = function(actor, target, actorTP, return utils.clamp(finalCriticalRate, 0.05, 1) -- TODO: Need confirmation of no upper cap. end +---@param actor CBaseEntity +---@param target CBaseEntity +---@param actorTP number +---@param slot xi.slot +---@param optCritModTable table? +---@return integer +xi.combat.physical.calculateRangedCriticalRate = function(actor, target, actorTP, slot, optCritModTable) + -- See reference at https://www.bg-wiki.com/ffxi/Critical_Hit_Rate + local finalCriticalRate = 0 + local baseCriticalRate = 0.05 + local statBonus = xi.combat.physical.criticalRateFromAGIDiff(actor, target) + local inninBonus = xi.combat.physical.criticalRateFromInnin(actor, target) + local fencerBonus = xi.combat.physical.criticalRateFromFencer(actor) + local buildingFlourishBonus = xi.combat.physical.criticalRateFromFlourish(actor) + local weaponSlotBonus = xi.combat.physical.criticalRateFromWeaponSlot(actor, slot) + local modifierBonus = actor:getMod(xi.mod.CRITHITRATE) / 100 + local meritBonus = actor:getMerit(xi.merit.CRIT_HIT_RATE) / 100 + local targetCriticalEvasion = target:getMod(xi.mod.CRITICAL_HIT_EVASION) / 100 + local targetMeritPenalty = target:getMerit(xi.merit.ENEMY_CRIT_RATE) / 100 + local tpFactor = 0 + + -- For weaponskills. + if optCritModTable then + tpFactor = xi.combat.physical.calculateTPfactor(actorTP, optCritModTable) + end + + -- Add all different bonuses and clamp. + finalCriticalRate = baseCriticalRate + statBonus + inninBonus + fencerBonus + buildingFlourishBonus + weaponSlotBonus + modifierBonus + meritBonus - targetCriticalEvasion - targetMeritPenalty + tpFactor + + return utils.clamp(finalCriticalRate, 0.05, 1) -- TODO: Need confirmation of no upper cap. +end + xi.combat.physical.calculateNumberOfHits = function(actor, additionalParamsHere) end diff --git a/scripts/globals/mobskills.lua b/scripts/globals/mobskills.lua index 926b1e3eaab..9fe8e5eb223 100644 --- a/scripts/globals/mobskills.lua +++ b/scripts/globals/mobskills.lua @@ -29,9 +29,15 @@ xi.mobskills.shadowBehavior = NUMSHADOWS_2 = 2, NUMSHADOWS_3 = 3, NUMSHADOWS_4 = 4, + NUMSHADOWS_5 = 5, + NUMSHADOWS_6 = 6, + NUMSHADOWS_7 = 7, + NUMSHADOWS_8 = 8, + NUMSHADOWS_9 = 9, WIPE_SHADOWS = 999, } +-- TODO: Currently still used by avatar skills. Marked for deletion once they get converted. ---@enum xi.mobskills.physicalTpBonus xi.mobskills.physicalTpBonus = { @@ -42,6 +48,7 @@ xi.mobskills.physicalTpBonus = CRIT_VARIES = 4, -- Deprecated, pending removal from mob skills } +-- TODO: Currently still used by avatar skills. Marked for deletion once they get converted. ---@enum xi.mobskills.magicalTpBonus xi.mobskills.magicalTpBonus = { @@ -61,6 +68,10 @@ local burstMultipliersByTier = [5] = 1.5, } +---@params target CBaseEntity +---@params actionElement xi.element +---@params skillChainCount integer +---@return number local function calculateMobMagicBurst(target, actionElement, skillchainCount) local burstMultiplier = 1.0 @@ -97,245 +108,884 @@ local function calculateMobMagicBurst(target, actionElement, skillchainCount) return burstMultiplier end -local function fTP(tp, ftp1, ftp2, ftp3) - tp = math.max(tp, 1000) +-- LLS definitions for normalizePhysicalSkillParams() +--- @class physicalSkillParams +--- @field baseDamage number|nil +--- @field numHits integer +--- @field fTP number[] +--- @field fTPSubsequentHits number[] +--- @field fTPBonus number +--- @field attackMultiplier number[] +--- @field accuracyModifier number[] +--- @field guaranteedFirstHit boolean +--- @field canCrit boolean +--- @field criticalChance number[] +--- @field ignoreDefense number[] +--- @field isCannonball boolean +--- @field attackType xi.attackType +--- @field damageType xi.damageType +--- @field hybridSkill boolean +--- @field hybridSkillElement xi.element +--- @field hybridAttackType xi.attackType +--- @field hybridDamageType xi.damageType +--- @field shadowBehavior xi.mobskills.shadowBehavior +--- @field skipStoneskin boolean +--- @field skipYaegasumi boolean +--- @field skipFSTR boolean +--- @field skipPDIF boolean +--- @field skipParry boolean +--- @field skipGuard boolean +--- @field skipBlock boolean +--- @field primaryMessage xi.msg.basic + +--- Table of default skill params shared by physical/ranged mobskills. +--- Sets default values if the params are not explicitly defined in the mobskill script. +--- @param skillParams physicalSkillParams +--- @return physicalSkillParams +local function normalizePhysicalSkillParams(skillParams) + local defaults = + { + baseDamage = nil, -- handled separately + numHits = 1, + fTP = { 1.00, 1.00, 1.00 }, + fTPSubsequentHits = { 1.00, 1.00, 1.00 }, + fTPBonus = 0, + attackMultiplier = { 1.00, 1.00, 1.00 }, + accuracyModifier = { 0, 0, 0 }, + guaranteedFirstHit = false, + canCrit = false, + criticalChance = { 0.00, 0.00, 0.00 }, + ignoreDefense = { 0.00, 0.00, 0.00 }, + isCannonball = false, + attackType = xi.attackType.PHYSICAL, + damageType = xi.damageType.SLASHING, + hybridSkill = false, + hybridSkillElement = xi.element.NONE, + hybridAttackType = xi.attackType.MAGICAL, + hybridDamageType = xi.damageType.ELEMENTAL, + shadowBehavior = xi.mobskills.shadowBehavior.NUMSHADOWS_1, + skipStoneskin = false, + skipYaegasumi = false, + skipFSTR = false, + skipPDIF = false, + skipParry = false, + skipGuard = false, + skipBlock = false, + primaryMessage = xi.msg.basic.DAMAGE, + } + + local result = {} - if tp >= 1000 and tp < 1500 then - return ftp1 + (((ftp2 - ftp1) / 500) * (tp - 1000)) - elseif tp >= 1500 and tp <= 3000 then - -- generate a straight line between ftp2 and ftp3 and find point @ tp - return ftp2 + (((ftp3 - ftp2) / 1500) * (tp - 1500)) + for paramName, defaultValue in pairs(defaults) do + result[paramName] = utils.defaultIfNil(skillParams[paramName], defaultValue) end - return 1 -- no ftp mod + return result +end + +-- Helper function to store default physical hit information before being modified. +---@class physicalHitInfo +---@field hitNumber integer The index of the hit in a multi-hit attack. +---@field hitLanded boolean Whether the hit connected with the target. +---@field hitYaegasumi boolean Whether the hit was absorbed by Yaegasumi. +---@field hitAnticipated boolean Whether the hit was anticipated (e.g. by an ability). +---@field hitParried boolean Whether the hit was parried. +---@field hitGuarded boolean Whether the hit was guarded. +---@field hitAbsorbed boolean Whether the hit was absorbed. +---@field hitBlocked boolean Whether the hit was blocked. +---@field isCritical boolean Whether the hit was a critical strike. +---@field pDif number The pDIF multiplier used for damage calculation. +---@field missType string|nil The type of miss, or nil if the hit landed. +---@field hitDamage integer The amount of damage dealt by the hit. +---@field shadowsConsumed integer The number of Utsusemi shadows consumed. + +---Creates a default HitInfo table for a physical hit before damage resolution. +---@param hitNumber integer The index of this hit in a multi-hit attack sequence. +---@return physicalHitInfo +local function defaultHitInfo(hitNumber) + return { + hitNumber = hitNumber, + hitLanded = false, + hitYaegasumi = false, + hitAnticipated = false, + hitParried = false, + hitGuarded = false, + hitAbsorbed = false, + hitBlocked = false, + isCritical = false, + pDif = 0, + missType = nil, + hitDamage = 0, + shadowsConsumed = 0, + } +end + +---Tallies the results of all hits from a physical mob skill into aggregate values. +---@param hitData physicalHitInfo[] List of hit result tables from `returnInfo.hitData` +---@return number totalDamage Sum of damage dealt across all landed hits +---@return number hitsLanded Count of hits that successfully dealt damage +---@return boolean hitsYaegasumi True if any hit was evaded by Yaegasumi +---@return boolean hitsAnticipated True if any hit was blocked by Third Eye anticipation +---@return number hitsAbsorbed Count of hits absorbed by shadows (Utsusemi/Blink) +---@return number shadowsAbsorbed Total number of shadow images consumed across all absorbed hits +---@return boolean anyCrit True if any landed hit was a critical strike +local function tallyHitResults(hitData) + local totalDamage = 0 + local hitsLanded = 0 + local hitsYaegasumi = false + local hitsAnticipated = false + local shadowsAbsorbed = 0 + local hitsAbsorbed = 0 + local anyCrit = false + + for _, hit in ipairs(hitData) do + if hit.hitLanded then + hitsLanded = hitsLanded + 1 + totalDamage = totalDamage + hit.hitDamage + anyCrit = anyCrit or hit.isCritical + end + + if hit.hitYaegasumi then + hitsYaegasumi = true + end + + if hit.hitAnticipated then + hitsAnticipated = true + end + + if hit.hitAbsorbed then + hitsAbsorbed = hitsAbsorbed + 1 + shadowsAbsorbed = shadowsAbsorbed + hit.shadowsConsumed + end + end + + return totalDamage, hitsLanded, hitsYaegasumi, hitsAnticipated, hitsAbsorbed, shadowsAbsorbed, anyCrit end ----@param mob CBaseEntity ----@param target CBaseEntity ---@param skill CPetSkill|CMobSkill ----@param numberofhits number ----@param accmod number? ----@param ftp number ----@param tpEffect xi.mobskills.physicalTpBonus? ----@param mtp000 number? ----@param mtp150 number? ----@param mtp300 number? ----@param params physicalMobSkillParam? ----@return physicalMobSkillRetVal -xi.mobskills.mobRangedMove = function(mob, target, skill, numberofhits, accmod, ftp, tpEffect, mtp000, mtp150, mtp300, params) - -- TODO: Replace this with ranged attack code - params = params or {} - params.isRanged = true - return xi.mobskills.mobPhysicalMove(mob, target, skill, numberofhits, accmod, ftp, tpEffect, mtp000, mtp150, mtp300, params) +---@param hitsLanded integer +---@param hitsYaegasumi boolean +---@param hitsAnticipated boolean +---@param hitsAbsorbed integer +---@param shadowsAbsorbed integer +---@param primaryMessage xi.msg.basic +---@param totalDamage integer +---@return integer +local function resolveMissMessage(skill, hitsLanded, hitsYaegasumi, hitsAnticipated, hitsAbsorbed, shadowsAbsorbed, primaryMessage, totalDamage) + if hitsLanded == 0 and hitsYaegasumi then + -- Yaegasumi + -- TODO: Get captures of Yaegasumi ability and confirm. + skill:setMsg(xi.msg.basic.EVADES) + elseif hitsLanded == 0 and hitsAnticipated then + -- Third Eye + skill:setMsg(xi.msg.basic.ANTICIPATE) + elseif hitsLanded == 0 and hitsAbsorbed > 0 then + -- Utsusemi and Blink + skill:setMsg(xi.msg.basic.SHADOW_ABSORB) + totalDamage = shadowsAbsorbed + elseif hitsLanded == 0 then + if primaryMessage == xi.msg.basic.RANGED_ATTACK_HIT then + skill:setMsg(xi.msg.basic.RANGED_ATTACK_MISS) + elseif primaryMessage == xi.msg.basic.HIT_DMG then + skill:setMsg(xi.msg.basic.HIT_MISS) + else + skill:setMsg(xi.msg.basic.SKILL_MISS) + end + + totalDamage = 0 + end + + return totalDamage end +-- passed to handleSinglePhysicalHit() inside xi.mobskills.mobPhysicalMove() and handleSingleRangedHit() inside xi.mobskills.mobRangedMove() +---@class physicalMobSkillHitParams +---@field hitNumber number +---@field attackType xi.attackType +---@field damageType xi.damageType +---@field shadowsToRemove number +---@field skipStoneskin boolean +---@field canCrit boolean +---@field weaponType xi.skill +---@field tpValue number +---@field attackMultiplier number +---@field critModTable table +---@field applyLevelCorrection boolean +---@field isCannonball boolean +---@field ignoreDefense boolean +---@field ignoreDefenseFactor number +---@field skipPDIF boolean +---@field skipParry boolean +---@field skipGuard boolean +---@field skipBlock boolean + -- helper function to handle a single hit and check for parrying, guarding, and blocking ---@param mob CBaseEntity ---@param target CBaseEntity ----@param hitdamage number ----@param hitslanded number ----@param finaldmg number +---@param baseHitDamage number ---@param params physicalMobSkillHitParams ----@return integer, integer, boolean -local function handleSinglePhysicalHit(mob, target, hitdamage, hitslanded, finaldmg, params) - -- Determine if this hit is critical - -- TODO: Remove CRIT_VARIES from existing mob skills and replace with params.canCrit - local isCritical = false +---@return physicalHitInfo +local function handleSinglePhysicalHit(mob, target, baseHitDamage, params) + local hitNumber = params.hitNumber + local hitParried = xi.combat.physical.isParried(target, mob) and not params.skipParry + local hitGuarded = xi.combat.physical.isGuarded(target, mob) and not params.skipGuard + local isCritical = false + local hitBlocked = false + local blockedWithShieldMastery = false + local hitInfo = defaultHitInfo(hitNumber) + + ---------------------------------- + -- Parry / Guard + ---------------------------------- + if hitParried then + hitInfo.hitParried = true + hitInfo.missType = 'Parried' + + return hitInfo + end + + if hitGuarded then + hitInfo.hitGuarded = true + hitInfo.missType = 'Guarded' + + return hitInfo + end + + ---------------------------------- + -- Critical Check + ---------------------------------- + if params.canCrit then + local critRate = xi.combat.physical.calculateSwingCriticalRate(mob, target, params.tpValue, xi.slot.MAIN, params.critModTable) + + isCritical = math.random(1, 1000) <= critRate * 1000 + end + + ---------------------------------- + -- PDIF + Damage + ---------------------------------- + local pDif = 1 + local hitDamage = 0 + + if not params.skipPDIF then + pDif = xi.combat.physical.calculateMeleePDIF(mob, target, params.weaponType, params.attackMultiplier, isCritical, params.applyLevelCorrection, params.ignoreDefense, params.ignoreDefenseFactor, false, xi.slot.MAIN, params.isCannonball) + end + + hitDamage = math.floor(baseHitDamage * pDif) + if - params.canCrit or - params.tpEffect == xi.mobskills.physicalTpBonus.CRIT_VARIES + xi.combat.physical.isBlocked(target, mob) and + not params.skipBlock then - local critRate = xi.combat.physical.calculateSwingCriticalRate(mob, target, mob:getTP(), xi.slot.MAIN) + hitBlocked = true + + hitDamage = hitDamage - xi.combat.physical.getDamageReductionForBlock(target, mob, hitDamage) + + if target:getMod(xi.mod.SHIELD_MASTERY_TP) > 0 then + blockedWithShieldMastery = true + end + end + + hitDamage = math.floor(hitDamage * xi.combat.damage.physicalElementSDT(target, params.damageType)) + hitDamage = math.floor(hitDamage * xi.combat.damage.calculateDamageAdjustment(target, true, false, false, false)) + + -- TODO: Automaton Steam Jacket Reduction + + -- TODO: Automaton Equalizer Reduction + + -- TODO: Need captures for different severe damage mechanics. Do they proc per hit or per skill + hitDamage = math.floor(target:handleSevereDamage(hitDamage, true)) + + -- TODO: Convert Damage to MP + Cover Bonus + + -- TODO: Fan Dance Reduction + + hitDamage = math.floor(target:checkDamageCap(hitDamage)) + hitDamage = utils.handlePhalanx(target, hitDamage) + + if not params.skipStoneskin then + hitDamage = utils.handleStoneskin(target, hitDamage) + end + + if hitDamage > 0 then + target:trySkillUp(xi.skill.EVASION, target:getMainLvl()) + + if not blockedWithShieldMastery then + target:tryHitInterrupt(mob) + end + end + + ---------------------------------- + -- Successful Hit + ---------------------------------- + hitInfo.hitLanded = true + hitInfo.hitDamage = hitDamage + hitInfo.hitBlocked = hitBlocked + hitInfo.isCritical = isCritical + hitInfo.pDif = pDif + + return hitInfo +end + +-- helper function to handle a single ranged hit and check for parrying, guarding, and blocking +---@param mob CBaseEntity +---@param target CBaseEntity +---@param baseHitDamage number +---@param params physicalMobSkillHitParams +---@return physicalHitInfo +local function handleSingleRangedHit(mob, target, baseHitDamage, params) + local hitNumber = params.hitNumber + local hitParried = xi.combat.physical.isParried(target, mob) and not params.skipParry + local hitGuarded = xi.combat.physical.isGuarded(target, mob) and not params.skipGuard + local isCritical = false + local hitBlocked = false + local blockedWithShieldMastery = false + local hitInfo = defaultHitInfo(hitNumber) + + ---------------------------------- + -- Parry / Guard + ---------------------------------- + if hitParried then + hitInfo.hitParried = true + hitInfo.missType = 'Parried' + + return hitInfo + end + + if hitGuarded then + hitInfo.hitGuarded = true + hitInfo.missType = 'Guarded' + + return hitInfo + end + + ---------------------------------- + -- Critical Check + ---------------------------------- + if params.canCrit then + local critRate = xi.combat.physical.calculateRangedCriticalRate(mob, target, params.tpValue, xi.slot.MAIN, params.critModTable) + isCritical = math.random(1, 1000) <= critRate * 1000 end - -- Calculate PDIF with critical flag for this specific hit - local pDif = 0 - if params.isRanged then - pDif = xi.combat.physical.calculateRangedPDIF(mob, target, params.weaponType, params.attMod, isCritical, params.applyLevelCorrection, false, 0, false, 0) - else - pDif = xi.combat.physical.calculateMeleePDIF(mob, target, params.weaponType, params.attMod, isCritical, params.applyLevelCorrection, false, 0, false, xi.slot.MAIN, params.isCannonball) + ---------------------------------- + -- PDIF + Damage + ---------------------------------- + local pDif = 1 + local hitDamage = 0 + + if not params.skipPDIF then + pDif = xi.combat.physical.calculateRangedPDIF(mob, target, params.weaponType, params.attackMultiplier, isCritical, params.applyLevelCorrection, params.ignoreDefense, params.ignoreDefenseFactor, false, 0) end - hitdamage = hitdamage * pDif + hitDamage = math.floor(baseHitDamage * pDif) - -- if a ranged physical mobskill then cannot be parried or guarded if - params.isRanged or - (not xi.combat.physical.isParried(target, mob) and - not xi.combat.physical.isGuarded(target, mob)) + xi.combat.physical.isBlocked(target, mob) and + not params.skipBlock then - -- also handle blocking - local blockedWithShieldMastery = false + hitBlocked = true - -- TODO: we took damage, so handle stoneskin and phalanx here - -- TODO: apply PDT/DT/damage resistance/absorption here + hitDamage = hitDamage - xi.combat.physical.getDamageReductionForBlock(target, mob, hitDamage) - -- What is the correct order of operations for SS, Phalanx and Block reduction? - if not params.isRanged and xi.combat.physical.isBlocked(target, mob) then - hitdamage = hitdamage - xi.combat.physical.getDamageReductionForBlock(target, mob, hitdamage) + if target:getMod(xi.mod.SHIELD_MASTERY_TP) > 0 then + blockedWithShieldMastery = true + end + end - if target:hasTrait(xi.trait.SHIELD_MASTERY) then - blockedWithShieldMastery = true + hitDamage = math.floor(hitDamage * xi.combat.damage.physicalElementSDT(target, params.damageType)) + hitDamage = math.floor(hitDamage * xi.combat.damage.calculateDamageAdjustment(target, true, false, true, false)) + + -- TODO: Automaton Steam Jacket Reduction + + -- TODO: Automaton Equalizer Reduction + + -- TODO: Need captures for different severe damage mechanics. Do they proc per hit or per skill + hitDamage = math.floor(target:handleSevereDamage(hitDamage, true)) + + -- TODO: Convert Damage to MP + Cover Bonus + + -- TODO: Fan Dance Reduction + + hitDamage = math.floor(target:checkDamageCap(hitDamage)) + hitDamage = utils.handlePhalanx(target, hitDamage) + + if not params.skipStoneskin then + hitDamage = utils.handleStoneskin(target, hitDamage) + end + + if hitDamage > 0 then + target:trySkillUp(xi.skill.EVASION, target:getMainLvl()) + + if not blockedWithShieldMastery then + target:tryHitInterrupt(mob) + end + end + + ---------------------------------- + -- Successful Hit + ---------------------------------- + hitInfo.hitLanded = true + hitInfo.hitDamage = hitDamage + hitInfo.hitBlocked = hitBlocked + hitInfo.isCritical = isCritical + hitInfo.pDif = pDif + + return hitInfo +end + +---@alias rangedMobSkillRetVal { damage: number, hybridDamage: number, hitsLanded: number, attackType: xi.attackType, damageType: xi.damageType, hybridAttackType: xi.attackType, hybridDamageType: xi.damageType, isCritical: boolean, hitData: table } + +---@param mob CBaseEntity +---@param target CBaseEntity +---@param skill CPetSkill|CMobSkill +---@param action CAction +---@param skillParams table +---@return rangedMobSkillRetVal +xi.mobskills.mobRangedMove = function(mob, target, skill, action, skillParams) + local returnInfo = {} + + -- Sanitizes skillParams and sets defaults for any params not explicitly set in mob skill scripts. + local params = normalizePhysicalSkillParams(skillParams) + + local damage = params.baseDamage or mob:getWeaponDmg() + + -- Initialize return structure + returnInfo.damage = 0 + returnInfo.hybridDamage = 0 + returnInfo.hitsLanded = 0 + returnInfo.attackType = params.attackType + returnInfo.damageType = params.damageType + returnInfo.hybridAttackType = params.hybridAttackType + returnInfo.hybridDamageType = params.hybridDamageType + returnInfo.isCritical = false + returnInfo.hitData = {} + + skill:setMsg(params.primaryMessage) + + ---------------------------------- + -- Base Damage Calculation + ---------------------------------- + local fSTR = 0 + local wscMods = xi.combat.physical.calculateWSC(mob, skillParams.str_wSC, skillParams.dex_wSC, skillParams.vit_wSC, skillParams.agi_wSC, skillParams.int_wSC, skillParams.mnd_wSC, skillParams.chr_wSC) + local bonusTP = mob:getMod(xi.mod.TP_BONUS) + params.fTPBonus + local skillTP = math.max(1000, skill:getTP()) + local tpValue = math.min(skillTP + bonusTP, 3000) + local basefTP = xi.combat.physical.calculateTPfactor(tpValue, params.fTP) + local baseDamage = 0 + + if not params.skipFSTR then + fSTR = xi.combat.physical.calculateRangedStatFactor(mob, target) + end + + baseDamage = math.max(1, math.floor((damage + fSTR + wscMods) * basefTP)) + + local subsequentDamage = baseDamage + if params.fTPSubsequentHits then + subsequentDamage = math.floor((damage + fSTR + wscMods) * xi.combat.physical.calculateTPfactor(tpValue, params.fTPSubsequentHits)) + end + + ---------------------------------- + -- Calculate Skill Params To Pass To hitParams. + ---------------------------------- + -- targetSpecialAttackEvasion gets transformed to a negative number since its a modifier on the target affecting the attacker's accuracy. + local targetSpecialAttackEvasion = target:getMod(xi.mod.SPECIAL_ATTACK_EVASION) * -1 + local accuracyModifier = 0 + if params.accuracyModifier then + accuracyModifier = xi.combat.physical.calculateTPfactor(tpValue, params.accuracyModifier) + end + + local attackMultiplier = 1 + if params.attackMultiplier then + attackMultiplier = xi.combat.physical.calculateTPfactor(tpValue, params.attackMultiplier) + end + + local ignoreDefenseFactor = 0 + local hitIgnoreDefense = false + if params.ignoreDefense then + ignoreDefenseFactor = xi.combat.physical.calculateTPfactor(tpValue, params.ignoreDefense) + hitIgnoreDefense = true + end + + ---------------------------------- + -- Params for the individual hits + ---------------------------------- + local hitParams = + { + hitNumber = 0, + attackType = params.attackType, + damageType = params.damageType, + skipStoneskin = params.skipStoneskin, + canCrit = params.canCrit, + weaponType = xi.skill.NONE, + tpValue = tpValue, + attackMultiplier = attackMultiplier, + critModTable = params.criticalChance, + applyLevelCorrection = xi.data.levelCorrection.isLevelCorrectedZone(mob), + isCannonball = params.isCannonball, + ignoreDefense = hitIgnoreDefense, + ignoreDefenseFactor = ignoreDefenseFactor, -- If the table exists, it ignores defense + skipPDIF = params.skipPDIF, + skipParry = params.skipParry, + skipGuard = params.skipGuard, + skipBlock = params.skipBlock, + } + + ---------------------------------- + -- Calculate the hits + ---------------------------------- + for hitNumber = 1, params.numHits do + local hitInfo = nil + local hitChance = 0 + local shadowsConsumed = 0 + local hitAbsorbed = false + local attackAnticipated = false + local attackYaegasumi = false + + ---------------------------------- + -- Handle Utsusemi and Blink + ---------------------------------- + hitAbsorbed, shadowsConsumed = xi.mobskills.handleShadowConsumption(target, skill, params, params.shadowBehavior) + + ---------------------------------- + -- Calculate Hit Rate + ---------------------------------- + if params.guaranteedFirstHit and hitNumber == 1 then + hitChance = 1 + elseif hitNumber == 1 then + -- First hit gets bonus accuracy. TODO: Confirm this and the amount if true. + hitChance = xi.combat.physicalHitRate.getRangedHitRate(mob, target, 100 + accuracyModifier + targetSpecialAttackEvasion, false) + else + hitChance = xi.combat.physicalHitRate.getRangedHitRate(mob, target, accuracyModifier + targetSpecialAttackEvasion, false) + end + + if not hitInfo then + -- If the skill did not penetrate and deal damage through the target's shadows, record hit as absorbed. + if hitAbsorbed then + hitInfo = defaultHitInfo(hitNumber) + hitInfo.hitAbsorbed = true + hitInfo.missType = 'Shadow' + hitInfo.shadowsConsumed = shadowsConsumed or 0 + elseif + not params.skipYaegasumi and + target:hasStatusEffect(xi.effect.YAEGASUMI) + -- TODO: Fully implement mechanics of this ability (TP Return to the target evading, WS damage bonus) + -- TODO: How does this interact with shadows/third eye? Do they overwrite? If they coexist, which takes priority? + then + attackYaegasumi = true -- TODO: Assuming this acts like Third Eye for now in that it blocks all hits. + hitInfo = defaultHitInfo(hitNumber) + hitInfo.hitYaegasumi = true + hitInfo.missType = 'Yaegasumi Evade' + elseif xi.combat.physicalHitRate.checkAnticipated(mob, target) then + attackAnticipated = true -- We use this below to break the attack loop since Third Eye blocks the whole skill. + hitInfo = defaultHitInfo(hitNumber) + hitInfo.hitAnticipated = true + hitInfo.missType = 'Anticipated' + elseif math.random(1, 100) <= hitChance * 100 then + hitParams.hitNumber = hitNumber + + local damageForThisHit = (hitNumber == 1) and baseDamage or subsequentDamage + + hitInfo = handleSingleRangedHit(mob, target, damageForThisHit, hitParams) + + hitInfo.shadowsConsumed = shadowsConsumed + else + hitInfo = defaultHitInfo(hitNumber) + hitInfo.missType = 'Evaded / Missed' end end - -- Reduce HP of target + -- Debugging + if not hitInfo then + error('hitInfo was not assigned for hit #' .. tostring(hitNumber)) + end - -- if this individual hit landed and > 0 damage was taken, try to interrupt + -- Record the individual hit into hitData table. + table.insert(returnInfo.hitData, hitInfo) + + -- Third Eye treats multi hit attacks as a single hit. + -- Exit early if there are remaining hits after the anticipated hit. if - hitdamage > 0 and - not blockedWithShieldMastery and - not params.isRanged + hitAbsorbed or + attackAnticipated or + attackYaegasumi then - target:tryHitInterrupt(mob) + break end + end + + ---------------------------------- + -- Tally All Hit Results + ---------------------------------- + local totalDamage, hitsLanded, hitsYaegasumi, hitsAnticipated, hitsAbsorbed, shadowsAbsorbed, anyCrit = tallyHitResults(returnInfo.hitData) + + ---------------------------------- + -- Handle Automaton Analyzer Attachment + ---------------------------------- + totalDamage = math.floor(utils.handleAutomatonAutoAnalyzer(target, skill, totalDamage)) + + ---------------------------------- + -- Handle Hybrid Skill Magic Damage + ---------------------------------- + local magicDamage = 0 - -- update the hitslanded and finaldmg - hitslanded = hitslanded + 1 - finaldmg = finaldmg + hitdamage + -- TODO: Need more research on hybrid skills. Is the magical damage strictly reliant on the physical hit doing damage? + -- How does xi.mod.MAGIC_DAMAGE and MAB interact with this? + if params.hybridSkill then + magicDamage = xi.mobskills.handleHybridDamage(mob, target, totalDamage, params.hybridSkillElement) end - return hitslanded, finaldmg, isCritical -end + ---------------------------------- + -- Handle Miss Messaging + ---------------------------------- + totalDamage = resolveMissMessage(skill, hitsLanded, hitsYaegasumi, hitsAnticipated, hitsAbsorbed, shadowsAbsorbed, params.primaryMessage, totalDamage) --- input to xi.mobskills.mobPhysicalMove ----@alias physicalMobSkillParam { canCrit: boolean?, isCannonball: boolean?, isRanged: boolean?} + -- Mob only gets TP for hitting the initial target. AOE hits do not count. + xi.mobskills.calculateSkillTPReturn(damage, mob, skill, target, params.attackType, hitsLanded) --- return value of xi.mobskills.mobPhysicalMove ----@alias physicalMobSkillRetVal { damage: number, hitslanded: number, isCritical: boolean} + returnInfo.damage = totalDamage + returnInfo.hybridDamage = magicDamage + returnInfo.hitsLanded = hitsLanded + returnInfo.isCritical = anyCrit --- passed to handleSinglePhysicalHit inside xi.mobskills.mobPhysicalMove ----@alias physicalMobSkillHitParams { canCrit: boolean, tpEffect: xi.mobskills.physicalTpBonus, weaponType: xi.skill, attMod: number, applyLevelCorrection: boolean, isCannonball: boolean, isRanged: boolean} + skill:setAttackType(xi.attackType.PHYSICAL) + skill:setCritical(anyCrit) + + return returnInfo +end + +---@alias physicalMobSkillRetVal { damage: number, hybridDamage: number, hitsLanded: number, attackType: xi.attackType, damageType: xi.damageType, hybridAttackType: xi.attackType, hybridDamageType: xi.damageType, isCritical: boolean, hitData: table } --- TODO: accMod currently does nothing ------------------------------------ --- Mob Physical Abilities --- accMod : linear multiplier for accuracy (1 default) --- ftp : linear multiplier for damage (1 default) --- tpEffect : Defined in xi.mobskills.physicalTpBonus --- params : optional table for additional parameters { canCrit = true, isCannonball = true, isRanged = true } ------------------------------------ ---@param mob CBaseEntity ---@param target CBaseEntity ---@param skill CPetSkill|CMobSkill ----@param numHits number ----@param accMod number? ----@param ftp number ----@param tpEffect xi.mobskills.physicalTpBonus? ----@param mtp000 number? ----@param mtp150 number? ----@param mtp300 number? ----@param params physicalMobSkillParam? +---@param action CAction +---@param skillParams table ---@return physicalMobSkillRetVal -xi.mobskills.mobPhysicalMove = function(mob, target, skill, numHits, accMod, ftp, tpEffect, mtp000, mtp150, mtp300, params) - params = params or {} - local returninfo = - { - damage = 0, - hitslanded = 0, - isCritical = false, - } +xi.mobskills.mobPhysicalMove = function(mob, target, skill, action, skillParams) + local returnInfo = {} - -- mobs use fSTR (but with special calculation in the called function) - local fSTR = xi.combat.physical.calculateMeleeStatFactor(mob, target) - if params.isRanged then - fSTR = xi.combat.physical.calculateRangedStatFactor(mob, target) + -- Sanitizes skillParams and sets defaults for any params not explicitly set in mob skill scripts. + local params = normalizePhysicalSkillParams(skillParams) + + local damage = params.baseDamage or mob:getWeaponDmg() + + -- Initialize return structure + returnInfo.damage = 0 + returnInfo.hybridDamage = 0 + returnInfo.hitsLanded = 0 + returnInfo.attackType = params.attackType + returnInfo.damageType = params.damageType + returnInfo.hybridAttackType = params.hybridAttackType + returnInfo.hybridDamageType = params.hybridDamageType + returnInfo.isCritical = false + returnInfo.hitData = {} + + skill:setMsg(params.primaryMessage) + + ---------------------------------- + -- Base Damage Calculation + ---------------------------------- + local fSTR = 0 + local wscMods = xi.combat.physical.calculateWSC(mob, skillParams.str_wSC, skillParams.dex_wSC, skillParams.vit_wSC, skillParams.agi_wSC, skillParams.int_wSC, skillParams.mnd_wSC, skillParams.chr_wSC) + local bonusTP = mob:getMod(xi.mod.TP_BONUS) + params.fTPBonus + local skillTP = math.max(1000, skill:getTP()) + local tpValue = math.min(skillTP + bonusTP, 3000) + local basefTP = xi.combat.physical.calculateTPfactor(tpValue, params.fTP) + local baseDamage = 0 + + if not params.skipFSTR then + fSTR = xi.combat.physical.calculateMeleeStatFactor(mob, target) end - --work out the base damage for a single hit - local hitdamage = math.max(1, mob:getWeaponDmg() + fSTR) * ftp + baseDamage = math.max(1, math.floor((damage + fSTR + wscMods) * basefTP)) - -- TODO: Remove this and use a scalable function for a single FTP value - if tpEffect == xi.mobskills.physicalTpBonus.DMG_VARIES then - hitdamage = hitdamage * fTP(skill:getTP(), mtp000, mtp150, mtp300) + local subsequentDamage = baseDamage + + if params.fTPSubsequentHits then + subsequentDamage = math.floor((damage + fSTR + wscMods) * xi.combat.physical.calculateTPfactor(tpValue, params.fTPSubsequentHits)) + end + + ---------------------------------- + -- Calculate Skill Params To Pass To hitParams. + ---------------------------------- + -- Mobs seem to not usually use TP moves during Mighty Strikes but if forced to by a script, the hits will crit. + if mob:hasStatusEffect(xi.effect.MIGHTY_STRIKES) then + params.canCrit = true + params.criticalChance = { 1.00, 1.00, 1.00 } + end + + -- targetSpecialAttackEvasion gets transformed to a negative number since its a modifier on the target affecting the attacker's accuracy. + local targetSpecialAttackEvasion = target:getMod(xi.mod.SPECIAL_ATTACK_EVASION) * -1 + local accuracyModifier = 0 + if params.accuracyModifier then + accuracyModifier = xi.combat.physical.calculateTPfactor(tpValue, params.accuracyModifier) end - local attMod = 1 + local attackMultiplier = 1 + if params.attackMultiplier then + attackMultiplier = xi.combat.physical.calculateTPfactor(tpValue, params.attackMultiplier) + end - if tpEffect == xi.mobskills.physicalTpBonus.ATK_VARIES then - attMod = fTP(skill:getTP(), mtp000, mtp150, mtp300) + local ignoreDefenseFactor = 0 + local hitIgnoreDefense = false + if params.ignoreDefense then + ignoreDefenseFactor = xi.combat.physical.calculateTPfactor(tpValue, params.ignoreDefense) + hitIgnoreDefense = true end - -- Get base hit damage calculation setup - local applyLevelCorrection = xi.data.levelCorrection.isLevelCorrectedZone(mob) - local canCrit = params.canCrit or false - local isCannonball = params.isCannonball or false - local isRanged = params.isRanged or false - local hitParams = + ---------------------------------- + -- Params for the individual hits + ---------------------------------- + local hitParams = { - canCrit = canCrit, - tpEffect = tpEffect, - weaponType = xi.skill.NONE, -- use NONE for mobs - attMod = attMod, - applyLevelCorrection = applyLevelCorrection, - isCannonball = isCannonball, - isRanged = isRanged, + hitNumber = 0, + attackType = params.attackType, + damageType = params.damageType, + skipStoneskin = params.skipStoneskin, + canCrit = params.canCrit, + weaponType = xi.skill.NONE, + tpValue = tpValue, + attackMultiplier = attackMultiplier, + critModTable = params.criticalChance, + applyLevelCorrection = xi.data.levelCorrection.isLevelCorrectedZone(mob), + isCannonball = params.isCannonball, + ignoreDefense = hitIgnoreDefense, + ignoreDefenseFactor = ignoreDefenseFactor, -- If the table exists, it ignores defense + skipPDIF = params.skipPDIF, + skipParry = params.skipParry, + skipGuard = params.skipGuard, + skipBlock = params.skipBlock, } - -- start the hits - local finaldmg = 0 - local hitsdone = 1 - local hitslanded = 0 - local hitCrit = false - - local targetSpecialAttackEvasion = target:getMod(xi.mod.SPECIAL_ATTACK_EVASION) + ---------------------------------- + -- Calculate the hits + ---------------------------------- - -- Not sure if this first hit bonus is real. Needs verification. - local firstHitBonus = 100 + for hitNumber = 1, params.numHits do + local hitInfo = nil + local hitChance = 0 + local shadowsConsumed = 0 + local hitAbsorbed = false + local attackAnticipated = false + local attackYaegasumi = false + + ---------------------------------- + -- Handle Utsusemi and Blink + ---------------------------------- + hitAbsorbed, shadowsConsumed = xi.mobskills.handleShadowConsumption(target, skill, params, params.shadowBehavior) + + ---------------------------------- + -- Calculate Hit Rate + ---------------------------------- + if + target:hasStatusEffect(xi.effect.PERFECT_DODGE) or + target:hasStatusEffect(xi.effect.ALL_MISS) + then + hitChance = 0 + elseif params.guaranteedFirstHit and hitNumber == 1 then + hitChance = 1 + elseif hitNumber == 1 then + -- First hit gets bonus accuracy. TODO: Confirm this and the amount if true. + hitChance = xi.combat.physicalHitRate.getPhysicalHitRate(mob, target, 100 + accuracyModifier + targetSpecialAttackEvasion, xi.attackAnimation.RIGHT_ATTACK, false) + else + hitChance = xi.combat.physicalHitRate.getPhysicalHitRate(mob, target, accuracyModifier + targetSpecialAttackEvasion, xi.attackAnimation.RIGHT_ATTACK, false) + end - if params.isRanged then - firstHitBonus = 40 - end + if not hitInfo then + -- If the skill did not penetrate and deal damage through the target's shadows, record hit as absorbed. + if hitAbsorbed then + hitInfo = defaultHitInfo(hitNumber) + hitInfo.hitAbsorbed = true + hitInfo.missType = 'Shadow' + hitInfo.shadowsConsumed = shadowsConsumed or 0 + elseif + not params.skipYaegasumi and + target:hasStatusEffect(xi.effect.YAEGASUMI) + -- TODO: Fully implement mechanics of this ability (TP Return to target evading, WS damage bonus) + -- TODO: How does this interact with shadows/third eye? Do they overwrite? If they coexist, which takes priority? + then + attackYaegasumi = true -- TODO: Assuming this acts like Third Eye for now in that it blocks all hits. + hitInfo = defaultHitInfo(hitNumber) + hitInfo.hitYaegasumi = true + hitInfo.missType = 'Yaegasumi Evade' + elseif xi.combat.physicalHitRate.checkAnticipated(mob, target) then + attackAnticipated = true -- We use this below to break the attack loop since Third Eye blocks the whole skill. + hitInfo = defaultHitInfo(hitNumber) + hitInfo.hitAnticipated = true + hitInfo.missType = 'Anticipated' + elseif math.random(1, 100) <= hitChance * 100 then + hitParams.hitNumber = hitNumber + + local damageForThisHit = (hitNumber == 1) and baseDamage or subsequentDamage + + hitInfo = handleSinglePhysicalHit(mob, target, damageForThisHit, hitParams) + + hitInfo.shadowsConsumed = shadowsConsumed + else + hitInfo = defaultHitInfo(hitNumber) + hitInfo.missType = 'Evaded / Missed' + end + end - local firstHitChance = xi.combat.physicalHitRate.getPhysicalHitRate(mob, target, targetSpecialAttackEvasion * -1 + firstHitBonus, xi.attackAnimation.RIGHT_ATTACK, false) - local hitrate = xi.combat.physicalHitRate.getPhysicalHitRate(mob, target, targetSpecialAttackEvasion * -1, xi.attackAnimation.RIGHT_ATTACK, false) + -- Debugging + if not hitInfo then + error('hitInfo was never assigned for hit #' .. tostring(hitNumber)) + end - -- TODO: handle Blink/Utsusemi/PD/etc - if math.random() <= firstHitChance then - local isCritical = false - -- use helper function check for parry guard and blocking and handle the hit - hitslanded, finaldmg, isCritical = handleSinglePhysicalHit(mob, target, hitdamage, hitslanded, finaldmg, hitParams) + -- Record the individual hit into hitData table. + table.insert(returnInfo.hitData, hitInfo) - hitCrit = isCritical or hitCrit -- set crit flag, might be used in WS messaging + -- Third Eye treats multi hit attacks as a single hit. + -- Exit early if there are remaining hits after the anticipated hit. + if + hitAbsorbed or + attackAnticipated or + attackYaegasumi + then + break + end end - -- TODO: handle Blink/Utsusemi/PD/etc - while hitsdone < numHits do - local isCritical = false - if math.random() <= hitrate then --it hit - hitslanded, finaldmg, isCritical = handleSinglePhysicalHit(mob, target, hitdamage, hitslanded, finaldmg, hitParams) - end + ---------------------------------- + -- Tally All Hit Results + ---------------------------------- + local totalDamage, hitsLanded, hitsYaegasumi, hitsAnticipated, hitsAbsorbed, shadowsAbsorbed, anyCrit = tallyHitResults(returnInfo.hitData) - hitCrit = isCritical or hitCrit -- set crit flag, might be used in WS messaging - hitsdone = hitsdone + 1 - end + ---------------------------------- + -- Handle Automaton Analyzer Attachment + ---------------------------------- + totalDamage = math.floor(utils.handleAutomatonAutoAnalyzer(target, skill, totalDamage)) - -- if an attack landed it must do at least 1 damage - if hitslanded >= 1 and finaldmg < 1 then - finaldmg = 1 - end + ---------------------------------- + -- Handle Hybrid Skill Magic Damage + ---------------------------------- + local magicDamage = 0 - -- all hits missed - if hitslanded == 0 then - finaldmg = 0 - hitslanded = 0 - skill:setMsg(xi.msg.basic.SKILL_MISS) - -- calculate tp return of mob skill and add if hit primary target - elseif skill:getPrimaryTargetID() == target:getID() and finaldmg > 0 then - local tpReturn = xi.combat.tp.getSingleMeleeHitTPReturn(mob, false) - tpReturn = tpReturn + 10 * (hitslanded - 1) -- extra hits give 10 TP each - mob:addTP(tpReturn) + -- TODO: Need more research on hybrid skills. Is the magical damage strictly reliant on the physical hit doing damage? + -- How does xi.mod.MAGIC_DAMAGE and MAB interact with this? + if params.hybridSkill then + magicDamage = xi.mobskills.handleHybridDamage(mob, target, totalDamage, params.hybridSkillElement) end - returninfo.damage = finaldmg - returninfo.hitslanded = hitslanded - returninfo.isCritical = hitCrit + ---------------------------------- + -- Handle Miss Messaging + ---------------------------------- + totalDamage = resolveMissMessage(skill, hitsLanded, hitsYaegasumi, hitsAnticipated, hitsAbsorbed, shadowsAbsorbed, params.primaryMessage, totalDamage) + + ---------------------------------- + -- Handle TP Returns + ---------------------------------- + xi.mobskills.calculateSkillTPReturn(damage, mob, skill, target, params.attackType, hitsLanded) + + returnInfo.damage = totalDamage + returnInfo.hybridDamage = magicDamage + returnInfo.hitsLanded = hitsLanded + returnInfo.isCritical = anyCrit skill:setAttackType(xi.attackType.PHYSICAL) - skill:setCritical(returninfo.isCritical) + skill:setCritical(anyCrit) - return returninfo + return returnInfo end ----------------------------------- @@ -462,17 +1112,18 @@ xi.mobskills.mobMagicalMove = function(mob, target, skill, action, skillParams) damage = math.floor((damage + wscMods + mob:getMod(xi.mod.MAGIC_DAMAGE)) * baseDamagefTPMult + dStat + additiveBonusDamage) damage = math.max(0, damage) - local hitsLanded = 1 -- Magic skills can't miss in the same way as physical skills so assume 1 hit landed for calculations. + local hitsLanded = 1 -- Magic skills can't miss in the same way as physical skills so assume 1 hit landed for calculations. + local hitAbsorbed = false + local shadowsConsumed = 0 -- TODO: SAM Yaegasumi ability. - -- Handle Shadows (Utsusemi, Blink, etc.) - damage = xi.mobskills.handleShadows(mob, target, skill, damage, attackType, shadowsToRemove) + hitAbsorbed, shadowsConsumed = xi.mobskills.handleShadowConsumption(target, skill, skillParams, shadowsToRemove) - if skill:getMsg() == xi.msg.basic.SHADOW_ABSORB then - -- Note: Damage in this case equals the amount of shadows consumed for the purpose of messaging. - -- takeDamage() is gated by returnInfo.hitsLanded being greater than 0 to prevent chip damage through shadows. - returnInfo.damage = damage + if hitAbsorbed then + skill:setMsg(xi.msg.basic.SHADOW_ABSORB) + + returnInfo.damage = shadowsConsumed returnInfo.hitsLanded = 0 return returnInfo @@ -680,18 +1331,19 @@ xi.mobskills.mobBreathMove = function(mob, target, skill, action, skillParams) end -- Calculate base damage - local damage = math.floor(mobCurrentHP * percentMultipier + bonusDamage) - local hitsLanded = 1 + local damage = math.floor(mobCurrentHP * percentMultipier + bonusDamage) + local hitsLanded = 1 + local hitAbsorbed = false + local shadowsConsumed = 0 -- TODO: SAM Yaegasumi ability. - -- Handle Shadows (Utsusemi, Blink, etc.) - damage = xi.mobskills.handleShadows(mob, target, skill, damage, attackType, shadowsToRemove) + hitAbsorbed, shadowsConsumed = xi.mobskills.handleShadowConsumption(target, skill, skillParams, shadowsToRemove) - if skill:getMsg() == xi.msg.basic.SHADOW_ABSORB then - -- Note: Damage in this case equals the amount of shadows consumed for the purpose of messaging. - -- takeDamage() is gated by returnInfo.hitsLanded being greater than 0 to prevent chip damage through shadows. - returnInfo.damage = damage + if hitAbsorbed then + skill:setMsg(xi.msg.basic.SHADOW_ABSORB) + + returnInfo.damage = shadowsConsumed returnInfo.hitsLanded = 0 return returnInfo @@ -806,154 +1458,8 @@ xi.mobskills.mobBreathMove = function(mob, target, skill, action, skillParams) return returnInfo end ----@param info magicalMobSkillRetVal|physicalMobSkillRetVal ----@param mob CBaseEntity ----@param skill CPetSkill|CMobSkill ----@param target CBaseEntity ----@param attackType xi.attackType ----@param damageType xi.damageType ----@param shadowsToRemove xi.mobskills.shadowBehavior|integer? ----@param hitsLanded number? ----@return number -xi.mobskills.mobFinalAdjustments = function(info, mob, skill, target, attackType, damageType, shadowsToRemove, hitsLanded) - if hitsLanded == nil then - hitsLanded = 0 - end - - local damage = info.damage - - -- If target has Hysteria, no message skip rest - -- TODO: Need to also handle in core to interrupt the mobskill. Proper behavior is: Mob will ready a skill but it will not fire off. - if mob:hasStatusEffect(xi.effect.HYSTERIA) then - skill:setMsg(xi.msg.basic.NONE) - return 0 - end - - -- Physical attack missed, skip rest. - if skill:hasMissMsg() then - return 0 - end - - -- Handle Perfect Dodge - if - (target:hasStatusEffect(xi.effect.PERFECT_DODGE) or - target:hasStatusEffect(xi.effect.ALL_MISS)) and - attackType == xi.attackType.PHYSICAL - then - skill:setMsg(xi.msg.basic.SKILL_MISS) - return 0 - end - - -- TODO: SAM Yaegasumi ability. - - -- TODO: Messaging for missed skill attacks (Mobskills that replace a mob's auto attacks). - - -- Set message to damage - -- This is for AoE because its only set once - if mob:getCurrentAction() == xi.action.category.PET_MOBABILITY_FINISH then - if skill:getMsg() ~= xi.msg.basic.JA_MAGIC_BURST then - skill:setMsg(xi.msg.basic.USES_JA_TAKE_DAMAGE) - end - else - skill:setMsg(xi.msg.basic.DAMAGE) - end - - -- Handle shadows depending on shadow behavior / attackType - if - shadowsToRemove ~= nil and - shadowsToRemove ~= xi.mobskills.shadowBehavior.WIPE_SHADOWS and - shadowsToRemove ~= xi.mobskills.shadowBehavior.IGNORE_SHADOWS - then - -- Handle Utsusemi preservation mechanic to reduce shadow consumption. - -- This is usually for AOE physical attacks(AOE Magic usually wipes shadows). - if - skill:isAoE() or - skill:isConal() - then - shadowsToRemove = utils.attemptShadowMitigation(target, shadowsToRemove) - end - - -- Remove shadows - local shadowsUsed = 0 - damage, shadowsUsed = utils.takeShadows(target, damage, shadowsToRemove) - - -- Dealt zero damage, so shadows took all hits. - if damage == 0 then - skill:setMsg(xi.msg.basic.SHADOW_ABSORB) - - return shadowsUsed - end - - elseif shadowsToRemove == xi.mobskills.shadowBehavior.WIPE_SHADOWS then -- Remove all shadows - target:delStatusEffect(xi.effect.COPY_IMAGE) - target:delStatusEffect(xi.effect.BLINK) - target:delStatusEffect(xi.effect.THIRD_EYE) - end - - if - attackType == xi.attackType.PHYSICAL or - attackType == xi.attackType.RANGED - then - if not skill:isSingle() then -- Remove Third Eye. Third eye does not block AOE attacks. - target:delStatusEffect(xi.effect.THIRD_EYE) - end - - -- Handle Third Eye using shadowbehav as a guide. - if xi.combat.physicalHitRate.checkAnticipated(mob, target) then - skill:setMsg(xi.msg.basic.ANTICIPATE) - - return 0 - end - end - - -- Handle Automaton Analyzer which decreases damage from successive special attacks - utils.handleAutomatonAutoAnalyzer(target, skill, damage) - - if attackType == xi.attackType.PHYSICAL then - damage = damage * xi.combat.damage.physicalElementSDT(target, damageType) - damage = target:physicalDmgTaken(damage, damageType) - elseif attackType == xi.attackType.BREATH then - -- Handle absorb messaging - if damage < 0 then - -- TODO: Handle Curse II HP/MP Nullification. - damage = target:addHP(-damage) - skill:setMsg(xi.msg.basic.SKILL_RECOVERS_HP) - - return damage - end - - damage = math.floor(target:handleSevereDamage(damage, false)) - damage = math.floor(target:checkDamageCap(damage)) - elseif attackType == xi.attackType.RANGED then - damage = damage * xi.combat.damage.physicalElementSDT(target, damageType) - damage = target:rangedDmgTaken(damage) - end - - if damage < 0 then - return damage - end - - damage = utils.handlePhalanx(target, damage) - - if attackType == xi.attackType.MAGICAL then - damage = utils.handleOneForAll(target, damage) - end - - damage = utils.handleStoneskin(target, damage) - - if damage > 0 then - target:updateEnmityFromDamage(mob, damage) - target:handleAfflatusMiseryDamage(damage) - end - - -- Calculate TP return of the mob skill. - xi.mobskills.calculateSkillTPReturn(damage, mob, skill, target, attackType, hitsLanded) - - return damage -end - xi.mobskills.calculateSkillTPReturn = function(damage, mob, skill, target, attackType, hitsLanded) - -- Calculate TP return of the mob skill. + -- Calculate TP return of the mob skill. if hitsLanded > 0 and damage > 0 @@ -961,10 +1467,18 @@ xi.mobskills.calculateSkillTPReturn = function(damage, mob, skill, target, attac local mobTPReturn = 0 local targetTPReturn = 0 - if attackType == xi.attackType.BREATH then + if attackType == xi.attackType.PHYSICAL then + mobTPReturn = xi.combat.tp.getSingleMeleeHitTPReturn(mob, false) + targetTPReturn = xi.combat.tp.calculateTPGainOnPhysicalDamage(mob, target, damage, mob:getBaseDelay()) + elseif attackType == xi.attackType.RANGED then + mobTPReturn = xi.combat.tp.getSingleRangedHitTPReturn(mob) + targetTPReturn = xi.combat.tp.calculateTPGainOnPhysicalDamage(mob, target, damage, mob:getBaseRangedDelay()) + elseif + attackType == xi.attackType.BREATH or + attackType == xi.attackType.MAGICAL + then mobTPReturn = xi.combat.tp.getSingleMeleeHitTPReturn(mob, false) targetTPReturn = xi.combat.tp.calculateTPGainOnPhysicalDamage(mob, target, damage, mob:getBaseDelay()) - -- TODO: Add TP return for MAGICAL, PHYSICAL, RANGED once added in future PRs. end -- Handle additional hit TP return for mob. @@ -978,7 +1492,13 @@ xi.mobskills.calculateSkillTPReturn = function(damage, mob, skill, target, attac -- Targets hit gain TP target:addTP(targetTPReturn) - -- TODO: SAVETP Mod + local saveTPModifier = mob:getMod(xi.mod.SAVETP) + if + saveTPModifier > 0 and + mob:getTP() < saveTPModifier + then + mob:setTP(saveTPModifier) + end end end @@ -997,16 +1517,6 @@ xi.mobskills.processDamage = function(actor, target, skill, action, info) return false end --- returns true if mob attack hit --- used to stop tp move status effects -xi.mobskills.mobPhysicalHit = function(skill) - if skill:hasMissMsg() then - return false - end - - return true -end - xi.mobskills.mobDrainMove = function(mob, target, drainType, drain, attackType, damageType) -- TODO: We clamp the drain in this function so the drain can not be more than what the target has. -- Is this also reflected in the damage messaging on retail? @@ -1045,19 +1555,6 @@ xi.mobskills.mobDrainMove = function(mob, target, drainType, drain, attackType, return xi.msg.basic.SKILL_NO_EFFECT end -xi.mobskills.mobPhysicalDrainMove = function(mob, target, skill, drainType, drain) - -- If target has Hysteria, no message skip rest - if mob:hasStatusEffect(xi.effect.HYSTERIA) then - return xi.msg.basic.NONE - end - - if xi.mobskills.mobPhysicalHit(skill) then - return xi.mobskills.mobDrainMove(mob, target, drainType, drain) - end - - return xi.msg.basic.SKILL_MISS -end - local drainEffectCorrelation = { [xi.effect.STR_DOWN] = xi.effect.STR_BOOST, @@ -1133,15 +1630,6 @@ xi.mobskills.mobStatusEffectMove = function(mob, target, typeEffect, power, tick return xi.msg.basic.SKILL_NO_EFFECT -- no effect end --- similar to status effect move except, this will not land if the attack missed -xi.mobskills.mobPhysicalStatusEffectMove = function(mob, target, skill, typeEffect, power, tick, duration) - if xi.mobskills.mobPhysicalHit(skill) then - return xi.mobskills.mobStatusEffectMove(mob, target, typeEffect, power, tick, duration) - end - - return xi.msg.basic.SKILL_MISS -end - -- similar to statuseffect move except it will only take effect if facing xi.mobskills.mobGazeMove = function(mob, target, typeEffect, power, tick, duration) if @@ -1209,58 +1697,71 @@ xi.mobskills.calculateKnockback = function(target, attacker, skill, action) return utils.clamp(skill:getKnockback() - target:getMod(xi.mod.KNOCKBACK_REDUCTION), xi.action.knockback.NONE, xi.action.knockback.LEVEL7) end ----@param actor CBaseEntity ---@param target CBaseEntity ---@param skill CMobSkill|CPetSkill ----@param damage integer ----@param attackType xi.attackType ----@param shadowsToRemove xi.mobskills.shadowBehavior|integer? -xi.mobskills.handleShadows = function(actor, target, skill, damage, attackType, shadowsToRemove) - -- Handle shadows depending on shadow behavior / attackType - if - shadowsToRemove ~= nil and - shadowsToRemove ~= xi.mobskills.shadowBehavior.WIPE_SHADOWS and - shadowsToRemove ~= xi.mobskills.shadowBehavior.IGNORE_SHADOWS - then - -- Utsusemi preservation (mostly AoE physical) - if skill:isAoE() or skill:isConal() then - shadowsToRemove = utils.attemptShadowMitigation(target, shadowsToRemove) - end +---@param params table +---@param shadowsToRemove xi.mobskills.shadowBehavior | integer +xi.mobskills.handleShadowConsumption = function(target, skill, params, shadowsToRemove) + local shadowsConsumed = 0 + local shadowsMitigated = 0 + local hitAbsorbed = false - local shadowsUsed = 0 - damage, shadowsUsed = utils.takeShadows(target, damage, shadowsToRemove) - - -- Shadows absorbed everything - if damage == 0 then - skill:setMsg(xi.msg.basic.SHADOW_ABSORB) - - return shadowsUsed - end + local isAoE = skill:isAoE() + local isConal = skill:isConal() - elseif shadowsToRemove == xi.mobskills.shadowBehavior.WIPE_SHADOWS then + ---------------------------------- + -- Wipe all shadows + ---------------------------------- + if shadowsToRemove == xi.mobskills.shadowBehavior.WIPE_SHADOWS then target:delStatusEffect(xi.effect.COPY_IMAGE) target:delStatusEffect(xi.effect.BLINK) - target:delStatusEffect(xi.effect.THIRD_EYE) + + -- Magical skills do not interact with Third Eye + if + params.attackType == xi.attackType.PHYSICAL or + params.attackType == xi.attackType.RANGED + then + target:delStatusEffect(xi.effect.THIRD_EYE) + end end - -- Physical / Ranged handling + ---------------------------------- + -- AoE physical skills remove Third Eye and Blink. + -- Magical skills do not interact with Third Eye. + ---------------------------------- if - attackType == xi.attackType.PHYSICAL or - attackType == xi.attackType.RANGED + isAoE or + isConal then - -- Third Eye does not block AoE attacks - if not skill:isSingle() then + if + params.attackType == xi.attackType.PHYSICAL or + params.attackType == xi.attackType.RANGED + then target:delStatusEffect(xi.effect.THIRD_EYE) end - -- Anticipate check (Third Eye) - if xi.combat.physicalHitRate.checkAnticipated(actor, target) then - skill:setMsg(xi.msg.basic.ANTICIPATE) - return 0 + target:delStatusEffect(xi.effect.BLINK) + end + + ---------------------------------- + -- Standard shadow handling + ---------------------------------- + if + shadowsToRemove ~= xi.mobskills.shadowBehavior.WIPE_SHADOWS and + shadowsToRemove ~= xi.mobskills.shadowBehavior.IGNORE_SHADOWS + then + local attemptedShadowRemoval = shadowsToRemove + + if isAoE or isConal then + shadowsMitigated = utils.attemptShadowMitigation(target, attemptedShadowRemoval) end + + local finalRemoval = attemptedShadowRemoval - shadowsMitigated + + hitAbsorbed, shadowsConsumed = utils.shadowAbsorb(target, finalRemoval) end - return damage + return hitAbsorbed, shadowsConsumed end xi.mobskills.calculatePetMagicAccuracyBonus = function(mob, target, actionElement) @@ -1287,3 +1788,38 @@ xi.mobskills.calculatePetMagicAccuracyBonus = function(mob, target, actionElemen return petAccBonus end + +xi.mobskills.handleHybridDamage = function(mob, target, physicalDamage, element) + local magicDamage = math.floor(physicalDamage * 2) + + -- Multipliers. + local nullifyDamage = xi.spells.damage.calculateNullification(target, element, true, false) + local absorbDamage = xi.spells.damage.calculateAbsorption(target, element.hybridSkillElement, true) + local sdt = 1 + local resist = 1 + local magicDamageAdjustment = 1 + local dayAndWeather = xi.spells.damage.calculateDayAndWeather(mob, element.hybridSkillElement, false) + local magicBonusDiff = xi.spells.damage.calculateMagicBonusDiff(mob, target, 0, 0, element.hybridSkillElement, 0) + local petAccBonus = xi.mobskills.calculatePetMagicAccuracyBonus(mob, target, element.hybridSkillElement) + -- Note: Elemental absorb mechanics such as Liement are calculated BEFORE resist/damage adjustments (such as shell/magic bursts). + + if absorbDamage > 0 then + sdt = xi.combat.damage.magicalElementSDT(target, element.hybridSkillElement) + resist = xi.combat.magicHitRate.calculateResistRate(mob, target, 0, 0, 0, element.hybridSkillElement, xi.mod.INT, 0, petAccBonus) + magicDamageAdjustment = xi.combat.damage.calculateDamageAdjustment(target, false, true, false, false) + end + + -- Calculate final damage. + magicDamage = math.floor(magicDamage * sdt) + magicDamage = math.floor(magicDamage * resist) + magicDamage = math.floor(magicDamage * dayAndWeather) + magicDamage = math.floor(magicDamage * magicBonusDiff) + magicDamage = math.floor(magicDamage * magicDamageAdjustment) + magicDamage = math.floor(magicDamage * absorbDamage) + magicDamage = math.floor(magicDamage * nullifyDamage) + magicDamage = utils.handleOneForAll(target, magicDamage) + + magicDamage = utils.handleStoneskin(target, magicDamage) + + return magicDamage +end diff --git a/scripts/globals/summon.lua b/scripts/globals/summon.lua index 7b7e8404fea..0d433b37568 100644 --- a/scripts/globals/summon.lua +++ b/scripts/globals/summon.lua @@ -101,6 +101,8 @@ xi.summon.getSummoningSkillOverCap = function(avatar) return math.max(summoningSkill - maxSkill, 0) end +---@alias physicalAvatarSkillRetVal { damage: number, hitslanded: number, isCritical: boolean} + ---@param avatar CBaseEntity ---@param target CBaseEntity ---@param skill CPetSkill|CMobSkill @@ -112,7 +114,7 @@ end ---@param mtp100 number ---@param mtp200 number ---@param mtp300 number ----@return physicalMobSkillRetVal +---@return physicalAvatarSkillRetVal xi.summon.avatarPhysicalMove = function(avatar, target, skill, numberofhits, accmod, dmgmod, dmgmodsubsequent, tpeffect, mtp100, mtp200, mtp300) local returninfo = {} @@ -260,7 +262,7 @@ local attackTypeShields = [xi.attackType.MAGICAL ] = xi.effect.MAGIC_SHIELD, } ----@param info magicalMobSkillRetVal|physicalMobSkillRetVal +---@param info magicalMobSkillRetVal|physicalAvatarSkillRetVal ---@param mob CBaseEntity ---@param skill CPetSkill|CMobSkill ---@param target CBaseEntity diff --git a/scripts/tests/packets/s2c/0x028_battle2/beastmaster.lua b/scripts/tests/packets/s2c/0x028_battle2/beastmaster.lua index e43fd52f9c4..06df00e136c 100644 --- a/scripts/tests/packets/s2c/0x028_battle2/beastmaster.lua +++ b/scripts/tests/packets/s2c/0x028_battle2/beastmaster.lua @@ -6,7 +6,7 @@ local packets = ['Jug Pet Ready'] = { test = function(player, mob) - stub('xi.mobskills.mobPhysicalMove', { damage = 1, hitslanded = 1, isCritical = false }) + stub('xi.mobskills.mobPhysicalMove', { damage = 1, hitsLanded = 1, isCritical = false }) local pmob = player.entities:moveTo('Clipper') player:changeJob(xi.job.BST) player:spawnPet(xi.petId.COLDBLOOD_COMO) diff --git a/scripts/tests/packets/s2c/0x028_battle2/mobskills.lua b/scripts/tests/packets/s2c/0x028_battle2/mobskills.lua index 4e90e511ae6..a5b2b6a9efd 100644 --- a/scripts/tests/packets/s2c/0x028_battle2/mobskills.lua +++ b/scripts/tests/packets/s2c/0x028_battle2/mobskills.lua @@ -95,7 +95,7 @@ local packets = test = function(player, mob) player:gotoZone(xi.zone.DYNAMIS_SAN_DORIA) local thfMob = player.entities:moveTo('Vanguard_Pillager') - thfMob:useMobAbility(xi.mobSkill.PERFECT_DODGE_1) + thfMob:useMobAbility(xi.mobSkill.PERFECT_DODGE_1, thfMob) xi.test.world:tickEntity(thfMob) end, diff --git a/scripts/tests/systems/targetfind.lua b/scripts/tests/systems/targetfind.lua index 2c005020197..784f50d7f91 100644 --- a/scripts/tests/systems/targetfind.lua +++ b/scripts/tests/systems/targetfind.lua @@ -44,7 +44,7 @@ describe('TargetFind', function() local m = stub('xi.mobskills.mobPhysicalMove', { damage = 100, - hitslanded = 3, + hitsLanded = 3, isCritical = false, }) -- All of them should go to Fafnir @@ -86,7 +86,7 @@ describe('TargetFind', function() local m = stub('xi.mobskills.mobPhysicalMove', { damage = 100, - hitslanded = 3, + hitsLanded = 3, isCritical = false, }) diff --git a/scripts/utils/combat_utils.lua b/scripts/utils/combat_utils.lua index 9e49bd3da88..9e7da302d27 100644 --- a/scripts/utils/combat_utils.lua +++ b/scripts/utils/combat_utils.lua @@ -1,29 +1,49 @@ ---@class utils utils = utils or {} --- A mechanic that will occasionaly reduce shadows consumed by 1 when hit by an AOE skill. +-- A mechanic that will occasionaly reduce shadows consumed when hit by an AOE skill. ---@nodiscard ---@param actor CBaseEntity ----@param shadowsToRemove integer +---@param attemptedRemovals integer ---@return integer -function utils.attemptShadowMitigation(actor, shadowsToRemove) - -- TODO: Currently unknown what conditions/skills/stats might affect proc rate. Ninjutsu, AGI, EVA skills might come to mind. - -- TODO: Does this work with Blink or only Copy Images? - -- TODO: Do mobs utilize this mechanic for their shadows? - -- Note: This seems to work with NIN subjob as well. +function utils.attemptShadowMitigation(actor, attemptedRemovals) + if attemptedRemovals <= 0 then + return 0 + end - local procChance = 60 + -- TODO: Does this mechanic work on players who are not NIN main or sub? If so remove NIN requirement. + -- See Yagyu Darkblade: https://www.bg-wiki.com/ffxi/Yagyu_Darkblade + local isNIN = actor:getMainJob() == xi.job.NIN or actor:getSubJob() == xi.job.NIN + local hasUtsusemi = actor:getMod(xi.mod.UTSUSEMI) > 0 if - (actor:getMainJob() == xi.job.NIN or actor:getSubJob() == xi.job.NIN) and - math.random(1, 100) <= procChance + not isNIN or + not hasUtsusemi -- Only works with Utsusemi then - shadowsToRemove = math.max(1, shadowsToRemove - 1) + return 0 end - return shadowsToRemove + -- TODO: Currently unknown exactly what stats affect procChance and by how much. SE mentions Ninjutsu Skill affects this to some degree. + -- Note: 50% was calculated from data with a relatively low Ninjutsu skill (Between 50-110~ skill range vs Lv. 75+ Targets) so this will likely lean on the conservative side (Weighted against players). + local procChance = 50 + + local mitigated = 0 + + -- Through research, a skill's shadowBehavior acts as a counter for how many shadow mitigation attempts are made(attemptedRemovals). + -- Example: An AoE skill that takes 4 shadows will attempt the mitgation step below 4 times. A shadow will only be mitigated if it passes the proc chance check. + for i = 1, attemptedRemovals do + if math.random(1, 100) <= procChance then + mitigated = mitigated + 1 + end + end + + local maxMitigatable = attemptedRemovals - 1 + + return math.min(mitigated, maxMitigatable) end +-- TODO: Marked for retirement. See: utils.shadowAbsorb() below. +-- Some abilities and skills still use this but will need to be slightly reworked to use utils.shadowAbsorb(). -- Calculate shadow consumption/damage absorbtion. ---@param actor CBaseEntity ---@param damage integer @@ -104,6 +124,53 @@ function utils.takeShadows(actor, damage, shadowsToRemove) return damage, shadowsUsed end +-- Calculate shadow consumption +---@param target CBaseEntity +---@param shadowsToRemove number +---@return boolean, number +function utils.shadowAbsorb(target, shadowsToRemove) + local shadowType = xi.mod.UTSUSEMI + local targetShadows = target:getMod(xi.mod.UTSUSEMI) + + if targetShadows == 0 then + if + target:getMod(xi.mod.BLINK) == 0 or + math.random(1, 100) > 80 + then + return false, 0 + end + + shadowType = xi.mod.BLINK + targetShadows = target:getMod(xi.mod.BLINK) + end + + local actualConsumed = math.min(targetShadows, shadowsToRemove) + local hadEnoughShadows = targetShadows >= shadowsToRemove + + targetShadows = targetShadows - actualConsumed + + if shadowType == xi.mod.UTSUSEMI then + local effect = target:getStatusEffect(xi.effect.COPY_IMAGE) + + if effect then + local icons = { xi.effect.COPY_IMAGE, xi.effect.COPY_IMAGE_2, xi.effect.COPY_IMAGE_3 } + + if icons[targetShadows] then + effect:setIcon(icons[targetShadows]) + end + end + end + + target:setMod(shadowType, targetShadows) + + if targetShadows == 0 then + target:delStatusEffect(xi.effect.COPY_IMAGE) + target:delStatusEffect(xi.effect.BLINK) + end + + return hadEnoughShadows, actualConsumed +end + -- Calculates Phalanx damage reduction. ---@nodiscard ---@param actor CBaseEntity diff --git a/src/map/entities/battleentity.cpp b/src/map/entities/battleentity.cpp index 452ee356444..ad528a07b76 100644 --- a/src/map/entities/battleentity.cpp +++ b/src/map/entities/battleentity.cpp @@ -2825,7 +2825,12 @@ void CBattleEntity::OnMobSkillFinished(CMobSkillState& state, action_t& action) result.messageID = msg; - if (PSkill->hasMissMsg()) + if (PSkill->getMsg() == MsgBasic::ShadowAbsorb) // Setting of shadow message is handled in mobskills.lua + { + result.resolution = ActionResolution::Miss; + result.param = damage; // damage is the number of shadows consumed to display in chat log + } + else if (PSkill->hasMissMsg()) { result.resolution = ActionResolution::Miss; result.param = 0; diff --git a/src/map/lua/lua_baseentity.cpp b/src/map/lua/lua_baseentity.cpp index 27dda5946b7..88f0ebfd4fc 100644 --- a/src/map/lua/lua_baseentity.cpp +++ b/src/map/lua/lua_baseentity.cpp @@ -13117,9 +13117,10 @@ uint16 CLuaBaseEntity::getBaseRangedDelay() } else if (PBattleEntity) { - baseDelay = 260; // TODO: There does not seem to be a real way to get the delay of a ranged attack of a non-PC. - // 260 delay is derived from a Goblin Hunter using a ranged attack, using Dark Seal Absorb TP to reverse the delay. - // The cast gave back 40 TP, which is half of 80 TP due to 50% dAGI penalty being maxed out. + baseDelay = 360; // Tested using Fatso Fargann's TP Drainkiss @ 3000 TP after a mob landed a ranged attack. + // TP Drainkiss is unaspected and is not affected by MDB or multipliers like shell. + // Fatso's TP Drainkiss fTPs are 0.625~ @1000TP and 1.0~ @3000TP + // TP Drained at 1.0 fTP was 93 on every normal non NM ranged mob no matter the family. } return baseDelay;