Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Prime_Punchmech = Skill:new{
- Class = "Prime",
- Icon = "weapons/prime_punchmech.png",
- Rarity = 3,
- Explosion = "",
- LaunchSound = "/weapons/titan_fist",
- Range = 1, -- Tooltip?
- PathSize = 1,
- Damage = 2,
- PushBack = false,
- Flip = false,
- Dash = false,
- Shield = false,
- Projectile = false,
- Push = 1, --Mostly for tooltip, but you could turn it off for some unknown reason
- PowerCost = 1,
- Upgrades = 2,
- --UpgradeList = { "Dash", "+2 Damage" },
- UpgradeCost = { 2 , 3 },
- TipImage = StandardTips.Melee
- }
- function Prime_Punchmech:GetSkillEffect(p1, p2)
- local ret = SkillEffect()
- local direction = GetDirection(p2 - p1)
- local doDamage = true
- local target = GetProjectileEnd(p1,p2,PATH_PROJECTILE)
- local push_damage = self.Flip and DIR_FLIP or direction
- local damage = SpaceDamage(target, self.Damage, push_damage)
- damage.sAnimation = "explopunch1_"..direction
- if self.Flip then damage.sAnimation = "SwipeClaw2" end -- Change the animation if it's a flip
- if self.Shield then
- local shield = SpaceDamage(p1,0)
- shield.iShield = EFFECT_CREATE
- ret:AddDamage(shield)
- end
- if self.Dash then
- if not Board:IsBlocked(target,PATH_PROJECTILE) then -- dont attack an empty edge square, just run to the edge
- doDamage = false
- target = target + DIR_VECTORS[direction]
- end
- ret:AddCharge(Board:GetSimplePath(p1, target - DIR_VECTORS[direction]), FULL_DELAY)
- elseif self.Projectile and target:Manhattan(p1) ~= 1 then
- damage.loc = target
- ret:AddDamage(SpaceDamage(p1,0,(direction+2)%4))
- ret:AddProjectile(damage, "effects/shot_fist")
- doDamage = false--damage covered here
- else
- target = p2
- end
- if doDamage then
- damage.loc = target
- ret:AddMelee(p2 - DIR_VECTORS[direction], damage)
- end
- if self.PushBack then
- ret:AddDamage(SpaceDamage(p1, 0, GetDirection(p1 - p2)))
- end
- return ret
- end
- Prime_Punchmech_A = Prime_Punchmech:new{
- PathSize = INT_MAX,
- Dash = true,
- TipImage = {
- Unit = Point(2,4),
- Enemy = Point(2,1),
- Target = Point(2,1)
- }
- }
- Prime_Punchmech_B = Prime_Punchmech:new{
- Damage = 4,
- }
- Prime_Punchmech_AB = Prime_Punchmech:new{
- PathSize = INT_MAX,
- Dash = true,
- Damage = 4,
- TipImage = Prime_Punchmech_A.TipImage
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement