mirror of
				https://bitbucket.org/Ioncannon/project-meteor-server.git
				synced 2025-05-20 08:26:59 -04:00 
			
		
		
		
	More bug fixes
Fixed loading status effects on login Fixed barrage issues Added untraited version of Protect Added sanguine rite
This commit is contained in:
		| @@ -10,11 +10,11 @@ function onAbilityStart(caster, target, ability) | ||||
| end; | ||||
|  | ||||
| function onSkillFinish(caster, target, skill, action, actionContainer) | ||||
|     ability.statusMagnitude = 4; | ||||
|     skill.statusMagnitude = 4; | ||||
|      | ||||
|     --27242: Enhanced Barrage: Adds an additional attack to barrage ( 4 -> 5 ) | ||||
|     if caster.HasTrait(27242) then | ||||
|         ability.statusMagnitude = 5; | ||||
|         skill.statusMagnitude = 5; | ||||
|     end | ||||
|  | ||||
|     --DoAction handles rates, buffs, dealing damage | ||||
|   | ||||
| @@ -10,6 +10,10 @@ function onAbilityStart(caster, target, ability) | ||||
| end; | ||||
|  | ||||
| function onSkillFinish(caster, target, skill, action, actionContainer) | ||||
|     --For some reason, light shot's hitNum is always 1 (or 0, idk), even with barrage.  | ||||
|     --If you set the hitnum like any other multi-hit WS it will play the animation repeatedly. | ||||
|     action.hitNum = 1; | ||||
|  | ||||
|     action.amount = skill.basePotency; | ||||
|     --DoAction handles rates, buffs, dealing damage | ||||
|     action.DoAction(caster, target, skill, actionContainer); | ||||
|   | ||||
| @@ -19,10 +19,10 @@ end; | ||||
| -- A bonus from INT (2INT=1HP) | ||||
| -- An additional random integer (580 at level 50. +/- 3%) | ||||
| function onSkillFinish(caster, target, skill, action, actionContainer) | ||||
|     --Base formula isn't quit known yet | ||||
|     local amount = 100; | ||||
|     --Heals can vary by up to ~3.5% in either direction | ||||
|     amount = math.Clamp(amount * (0.965 + (math.rand() * 7.0)), 0, 9999); | ||||
|     --Base amount seems to be 0.215x^2 - 0.35x + 60 | ||||
|     local amount = (0.215 * math.pow(caster.GetLevel(), 2)) - (0.35 * caster.GetLevel()) + 60; | ||||
|     --Heals can vary by up to 3% | ||||
|     amount = math.Clamp(amount * (0.97 + (math.rand() * 3.0)), 0, 9999); | ||||
|  | ||||
|     --PGL gets an INT bonus for Second Wind | ||||
|     if caster.GetClass() == 2 then | ||||
|   | ||||
| @@ -13,10 +13,10 @@ end; | ||||
| function onSkillFinish(caster, target, skill, action, actionContainer) | ||||
|     --Actual amount of def/mdef will be calculated in OnGain | ||||
|     skill.statusMagnitude = caster.GetMod(modifiersGlobal.MagicEnhancePotency); | ||||
|  | ||||
|      | ||||
|     --27365: Enhanced Protect: Increases magic defense gained from Protect. | ||||
|     if caster.HasTrait(27365) then | ||||
|         skill.statusTier = 2; | ||||
|         skill.statusId = 223129 | ||||
|     end | ||||
|      | ||||
|     --DoAction handles rates, buffs, dealing damage | ||||
|   | ||||
| @@ -10,6 +10,12 @@ function onMagicStart(caster, target, spell) | ||||
| end; | ||||
|  | ||||
| function onSkillFinish(caster, target, skill, action, actionContainer) | ||||
|  | ||||
|     --27324: Enhanced Sanguine Rite: Reduces damage taken | ||||
|     if caster.HasTrait(27365) then | ||||
|         skill.statusId = 223240 | ||||
|     end | ||||
|  | ||||
|     --DoAction handles rates, buffs, dealing damage | ||||
|     action.DoAction(caster, target, skill, actionContainer); | ||||
| end; | ||||
| @@ -20,7 +20,7 @@ function onSkillFinish(caster, target, skill, action, actionContainer) | ||||
|  | ||||
|     --DoAction handles rates, buffs, dealing damage | ||||
|     action.DoAction(caster, target, skill, actionContainer); | ||||
|  | ||||
|      | ||||
|     --Try to apply status effect | ||||
|     action.TryStatus(caster, target, skill, actionContainer, true); | ||||
| end; | ||||
							
								
								
									
										18
									
								
								data/scripts/effects/protect.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								data/scripts/effects/protect.lua
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | ||||
| require("modifiers") | ||||
|  | ||||
| function onGain(target, effect) | ||||
|     --Magnitude is caster's Enhancing Magic Potency.     | ||||
|     --http://forum.square-enix.com/ffxiv/threads/41900-White-Mage-A-Guide | ||||
|     --5-4-5-4-5-4-5-4-5 repeating points of Enhancing for 1 defense | ||||
|     --4.56 * Enhancing Potency | ||||
|     local defenseBuff = 4.56 * effect.GetMagnitude(); | ||||
|  | ||||
|     target.AddMod(modifiersGlobal.Defense, defenseBuff); | ||||
| end; | ||||
|  | ||||
| function onLose(target, effect)     | ||||
|     local defenseBuff = 4.56 * effect.GetMagnitude(); | ||||
|  | ||||
|     target.SubtractMod(modifiersGlobal.Defense, defenseBuff); | ||||
| end; | ||||
|  | ||||
							
								
								
									
										8
									
								
								data/scripts/effects/sanguine_rite2.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								data/scripts/effects/sanguine_rite2.lua
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | ||||
| require("modifiers") | ||||
|  | ||||
| --Sanguine Rite restores 30% of damage taken as MP | ||||
| function onDamageTaken(effect, attacker, defender, action, actionContainer) | ||||
|     local mpToRestore = action.amount * 0.30; | ||||
|     defender.AddMP(mpToRestore); | ||||
|     actionContainer.AddMPAction(defender, 33011, mpToRestore); | ||||
| end | ||||
							
								
								
									
										22
									
								
								data/scripts/effects/sanguine_rite3.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								data/scripts/effects/sanguine_rite3.lua
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,22 @@ | ||||
| require("modifiers") | ||||
|  | ||||
| function onGain(target, effect) | ||||
|     --Traited Sanguine Rite reduces damage taken by 25%. | ||||
|     --The icon in game says it's 50%, but it's lying | ||||
|     local amount = 25; | ||||
|  | ||||
|     target.AddMod(modifiersGlobal.DamageTakenDown, amount); | ||||
| end; | ||||
|  | ||||
| function onLose(target, effect)     | ||||
|     local amount = 25; | ||||
|  | ||||
|     target.SubtractMod(modifiersGlobal.DamageTakenDown, amount); | ||||
| end; | ||||
|  | ||||
| --Sanguine Rite restores 30% of damage taken as MP | ||||
| function onDamageTaken(effect, attacker, defender, action, actionContainer) | ||||
|     local mpToRestore = action.amount * 0.30; | ||||
|     defender.AddMP(mpToRestore); | ||||
|     actionContainer.AddMPAction(defender, 33011, mpToRestore); | ||||
| end | ||||
		Reference in New Issue
	
	Block a user