Commit 104e282a authored by Jean Miraak's avatar Jean Miraak 💬 Committed by brabox

(!508) Frying Pan specialpower

parent 5eb4f6e0
- Sam's Frying Pan ability now works properly with auto-cast and no longer targets friendly units.
......@@ -1449,9 +1449,11 @@ CommandButton Command_TogglePippinWeapon ;,;
End
CommandButton Command_BonkEnemyWithFryingPan ;,; Uncommented
Command = FIRE_WEAPON
WeaponSlot = SECONDARY
Options = NEED_TARGET_ENEMY_OBJECT NEED_TARGET_NEUTRAL_OBJECT NO_PLAY_UNIT_SPECIFIC_SOUND_FOR_AUTO_ABILITY ;,; NEED_TARGET_ENEMY_OBJECT
Command = SPECIAL_POWER ;,;
SpecialPower = SpecialAbilitySamFryingPan ;,;
;,;Command = FIRE_WEAPON
;,;WeaponSlot = SECONDARY
Options = NEED_TARGET_ENEMY_OBJECT
TextLabel = CONTROLBAR:FryingPan
ButtonImage = HPSamFryingPan ;,; HSEomerThrowSpear
CursorName = Bombard
......@@ -1459,8 +1461,8 @@ CommandButton Command_BonkEnemyWithFryingPan ;,; Uncommented
DescriptLabel = CONTROLBAR:ToolTipFryingPan
InvalidCursorName = GenericInvalid
AutoAbility = Yes ;,;
UnitSpecificSound = SamVoiceUsePhial ;,;
SetAutoAbilityUnitSound = SamVoiceUsePhial ; Only when he is set to use it, not each time he uses it ;,;
;,;UnitSpecificSound = SamVoiceUsePhial ;,;
;,;SetAutoAbilityUnitSound = SamVoiceUsePhial ; Only when he is set to use it, not each time he uses it ;,;
InPalantir = Yes
DisableOnModelCondition = WEAPONSET_TOGGLE_1 ;,;
End
......
......@@ -7217,9 +7217,9 @@
;-----------------------Sam-------------------------
#define SAM_HEALTH 600
#define SAM_PAN_PREATTACKDELAY 2000 ;,; 800
#define SAM_PAN_PREATTACKDELAY 800
#define SAM_PAN_DELAYBETWEENSHOTS 800
#define SAM_PAN_FIRINGDURATION 2000 ;,; 800
#define SAM_PAN_FIRINGDURATION 800
#define SAM_PAN_DAMAGE 500 ;,; 100
#define SAM_BUILDTIME 15
......
......@@ -295,12 +295,12 @@ Object RohanSam
EndScript
End
AnimationState = FIRING_OR_PREATTACK_B
AnimationState = SPECIAL_WEAPON_ONE ;,; FIRING_OR_PREATTACK_B
StateName = STATE_Ready_Sword
Animation = ATKA
AnimationName = RUSam_ATKE
AnimationMode = ONCE
UseWeaponTiming = Yes
;,;UseWeaponTiming = Yes
End
BeginScript
Prev = CurDrawablePrevAnimationState()
......@@ -622,9 +622,8 @@ Object RohanSam
Conditions = None
Weapon = PRIMARY HobbitSword
AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
Weapon = SECONDARY SamFryingPanBonk ;,; Uncommented
AutoChooseSources = SECONDARY NONE ;,; Uncommented
ShareWeaponReloadTime = Yes ;,;
; Weapon = SECONDARY SamFryingPanBonk
; AutoChooseSources = SECONDARY NONE
End
WeaponSet
......@@ -810,8 +809,8 @@ Object RohanSam
HoldGroundCloseRangeDistance = 40
End
Behavior = AutoAbilityBehavior ModuleTag_AutoAbilityBehavior
End
;,;Behavior = AutoAbilityBehavior ModuleTag_AutoAbilityBehavior
;,;End
LocomotorSet
Locomotor = HeroHumanLocomotor
......@@ -846,6 +845,37 @@ Object RohanSam
DestructionDelay = 8000
End
Behavior = SpecialPowerModule ModuleTag_SamFryingPanStarter ;,;
SpecialPowerTemplate = SpecialAbilitySamFryingPan
UpdateModuleStartsAttack = Yes
StartsPaused = No
InitiateSound = SamVoiceUsePhial
End
Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_SamFryingPanUpdate ;,;
SpecialPowerTemplate = SpecialAbilitySamFryingPan
SkipContinue = Yes
UnpackTime = 1400
PackTime = 1400
AwardXPForTriggering = 0
StartAbilityRange = 15.0
MustFinishAbility = Yes
SpecialWeapon = SamFryingPanBonk
WhichSpecialWeapon = 1
RejectedConditions = WEAPON_TOGGLE
End
Behavior = AutoAbilityBehavior ModuleTag_SamFryingPanAutoAbility ;,;
SpecialAbility = SpecialAbilitySamFryingPan
ForbiddenStatus = INSIDE_GARRISON ;This seems to prevent the ability from being used inside a tower
MaxScanRange = 15
Query = 10 ALL ENEMIES -STRUCTURE -WALL_UPGRADE -WALL_HUB -WALL_SEGMENT -DEFENSIVE_WALL -FS_BASE_DEFENSE
End
Behavior = BezierProjectileBehavior ModuleTag_08 ; Module starts asleep, and wakes up when thrown.
;
FirstHeight = 24 ; Height of Bezier control points above highest intervening terrain
......
......@@ -2606,5 +2606,12 @@ SpecialPower SpecialAbilityBloodThirstyFerocity ;,;
Enum = SPECIAL_GENERAL_TARGETLESS
End
;------------------------------------------------------------------------------
SpecialPower SpecialAbilitySamFryingPan ;,;
Enum = SPECIAL_AT_VISIBLE_GROUNDED_OBJECT
ReloadTime = 30000
PublicTimer = No
End
#include "CreateAHeroSpecialPowers.ini"
......@@ -1059,12 +1059,12 @@ Weapon SamFryingPanBonk ;,; Uncommented
DelayBetweenShots = SAM_PAN_DELAYBETWEENSHOTS ; time between shots, msec
PreAttackDelay = SAM_PAN_PREATTACKDELAY
FiringDuration = SAM_PAN_FIRINGDURATION
FiringDuration = SAM_PAN_FIRINGDURATION
RadiusDamageAffects = ENEMIES NEUTRALS NOT_SIMILAR ;,;
ClipReloadTime = 30000 ;,; 10000 this is the ability recharge time
ClipSize = 1
AutoReloadsClip = Yes
InstantLoadClipOnActivate = Yes ;,;
;,;ClipReloadTime = 30000 ;,; 10000 this is the ability recharge time
;,;ClipSize = 1
;,;AutoReloadsClip = Yes
DamageNugget ; A basic Nugget that just does damage
Damage = SAM_PAN_DAMAGE
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment