mirror of
				https://bitbucket.org/Ioncannon/project-meteor-server.git
				synced 2025-05-20 08:26:59 -04:00 
			
		
		
		
	added mob name colour update
- added mobmods (need to be loaded from db) - added Zone.GetBattleNpcById - added missing IsValidTarget check in AttackState
This commit is contained in:
		
							
								
								
									
										27
									
								
								data/scripts/commands/weaponskill/fast_blade.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								data/scripts/commands/weaponskill/fast_blade.lua
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,27 @@ | ||||
| require("global"); | ||||
| require("weaponskill"); | ||||
|  | ||||
| function onSkillPrepare(caster, target, spell) | ||||
|     return 0; | ||||
| end; | ||||
|  | ||||
| function onSkillStart(caster, target, spell) | ||||
|     return 0; | ||||
| end; | ||||
|  | ||||
| function onSkillFinish(caster, target, spell, action) | ||||
|     local damage = math.random(10, 100); | ||||
|      | ||||
|     -- todo: populate a global script with statuses and modifiers | ||||
|     action.worldMasterTextId = 0x765D; | ||||
|      | ||||
|     -- todo: populate a global script with statuses and modifiers | ||||
|     -- magic.HandleAttackSkill(caster, target, spell, action) | ||||
|     -- action.effectId = bit32.bxor(0x8000000, spell.effectAnimation, 15636); | ||||
|     action.effectId = bit32.bxor(0x8000000, spell.effectAnimation, 15636); | ||||
|      | ||||
|     if target.hateContainer then | ||||
|         target.hateContainer.UpdateHate(caster, damage); | ||||
|     end; | ||||
|     return damage; | ||||
| end; | ||||
| @@ -7,10 +7,11 @@ magic = | ||||
| }; | ||||
|  | ||||
| --[[ | ||||
|      modifier - Modifier.Intelligence, Modifier.Mind (see Modifier.cs) | ||||
|      statId - see BattleTemp.cs | ||||
|      modifierId - Modifier.Intelligence, Modifier.Mind (see Modifier.cs) | ||||
|      multiplier -  | ||||
|   ]] | ||||
| function magic.HandleHealingMagic(caster, target, spell, action, modifierId, multiplier, baseAmount) | ||||
| function magic.HandleHealingMagic(caster, target, spell, action, statId, modifierId, multiplier, baseAmount) | ||||
|     potency = potency or 1.0; | ||||
|     healAmount = baseAmount; | ||||
|      | ||||
| @@ -18,19 +19,19 @@ function magic.HandleHealingMagic(caster, target, spell, action, modifierId, mul | ||||
|     local mind = caster.GetMod(Modifier.Mind); | ||||
| end; | ||||
|  | ||||
| function magic.HandleAttackMagic(caster, target, spell, action, modifierId, multiplier, baseAmount) | ||||
| function magic.HandleAttackMagic(caster, target, spell, action, statId, modifierId, multiplier, baseAmount) | ||||
|     -- todo: actually handle this | ||||
|     damage = baseAmount or math.random(1,10) * 10; | ||||
|      | ||||
|     return damage; | ||||
| end; | ||||
|  | ||||
| function magic.HandleEvasion(caster, target, spell, action, modifierId) | ||||
| function magic.HandleEvasion(caster, target, spell, action, statId, modifierId) | ||||
|  | ||||
|     return false; | ||||
| end; | ||||
|  | ||||
| function magic.HandleStoneskin(caster, target, spell, action, modifierId, damage) | ||||
| function magic.HandleStoneskin(caster, target, spell, action, statId, modifierId, damage) | ||||
|     --[[ | ||||
|     if target.statusEffects.HasStatusEffect(StatusEffect.Stoneskin) then | ||||
|         -- todo: damage reduction | ||||
|   | ||||
							
								
								
									
										42
									
								
								data/scripts/weaponskill.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								data/scripts/weaponskill.lua
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,42 @@ | ||||
| -- todo: add enums for status effects in global.lua | ||||
| require("global") | ||||
|  | ||||
| weaponskill = | ||||
| { | ||||
|      | ||||
| }; | ||||
|  | ||||
| --[[ | ||||
|      statId - see BattleTemp.cs | ||||
|      modifier - Modifier.Intelligence, Modifier.Mind (see Modifier.cs) | ||||
|      multiplier -  | ||||
|   ]] | ||||
| function weaponskill.HandleHealingSkill(caster, target, spell, action, statId, modifierId, multiplier, baseAmount) | ||||
|     potency = potency or 1.0; | ||||
|     healAmount = baseAmount; | ||||
|      | ||||
|     -- todo: shit based on mnd | ||||
|     local mind = caster.GetMod(Modifier.Mind); | ||||
| end; | ||||
|  | ||||
| function weaponskill.HandleAttackSkill(caster, target, spell, action, statId, modifierId, multiplier, baseAmount) | ||||
|     -- todo: actually handle this | ||||
|     damage = baseAmount or math.random(1,10) * 10; | ||||
|      | ||||
|     return damage; | ||||
| end; | ||||
|  | ||||
| function weaponskill.HandleEvasion(caster, target, spell, action, statId, modifierId) | ||||
|  | ||||
|     return false; | ||||
| end; | ||||
|  | ||||
| function weaponskill.HandleStoneskin(caster, target, spell, action, statId, modifierId, damage) | ||||
|     --[[ | ||||
|     if target.statusEffects.HasStatusEffect(StatusEffect.Stoneskin) then | ||||
|         -- todo: damage reduction | ||||
|         return true; | ||||
|     end; | ||||
|     ]] | ||||
|     return false; | ||||
| end; | ||||
		Reference in New Issue
	
	Block a user