actor RisingFistWep_NormalBar : NormalBar { args 248, 41 }

actor RisingFistWep : BaseMM8BDMWep
{
Weapon.AmmoUse 3
Weapon.AmmoGive 28
Weapon.SlotNumber 4
Inventory.Pickupmessage "$PU_RISINGFIST"
Obituary "$OB_RISINGFIST"
Tag "$TAG_RISINGFIST"
weapon.ammotype "RisingFistAmmo"
inventory.icon "XTR0WI_B"
States
{
SpawnLoop:
XWI0 B -1
loop

Deselect:
XH0B A 0
goto DeselectSwap
Select:
XH0B A 0 A_TakeInventory("RisingFistFlag")
goto SelectSwap

Ready:
XH0B A 0 ACS_NamedExecuteWithResult("core_weaponcolor",DYE_RISINGFIST)
XH0B A 1 A_WeaponReady
wait

Fire:
XH0B B 0 A_JumpIfNoAmmo("NoAmmo")
XH0B B 0 A_GiveInventory("NoJumpCancel",1)
XH0B B 0 ACS_NamedExecuteWithResult("core_unsolidplayer",0,USP_TOGGLEON)
XH0B B 0 A_PlaySoundEx("PunchOut/MacUpper","Weapon")
XH0B B 0 A_PlaySoundEx("weapon/SlashDClaw","Body")
XH0B B 0 ACS_NamedExecuteWithResult("core_stopplayer",0,1)
XH0B C 1 Offset(-11,95)//A_ChangeVelocity(37,0,momz/2+6,3)
XH0B C 1 Offset(-11,95)A_TakeInventory("RisingFistAmmo",3,1)
XH0B B 0 A_GiveInventory("Copy_RisingFistStart_P")
XH0B C 1 Offset(-27,64)A_GiveInventory("Copy_RisingFistH_P",1)
XH0B C 1 Offset(-27,64)A_GiveInventory("Copy_RisingFistH_P2",1)
XH0B BBBBBBBBBB 1 Offset(1,31)A_GiveInventory("Copy_RisingFistH_P2",1)
XH0B C 2 Offset(1,31)ACS_NamedExecuteWithResult("core_stopplayer",0,0)
XH0B C 2 Offset(38,43)
TNT1 A 4
TNT1 A 0 ACS_NamedExecuteWithResult("core_unsolidplayer",0,USP_TOGGLEOFF_DAMAGE,CallACS("core_getmaxhealth")/10)
TNT1 A 2 ACS_NamedExecuteWithResult("cbm_cantpushwallsplayer",0,0)
TNT1 A 0 A_TakeInventory("NoJumpCancel",1)
TNT1 A 2 A_WeaponReady(14)
goto Recovery
Recovery:
TNT1 A 0 A_JumpIf(z-floorz==0,"Recovered")
TNT1 A 0 A_JumpIf(momz==0,"Recovery_Z")
TNT1 A 0 A_JumpIfInventory("RisingFistFlag",70,"Recovered")
TNT1 A 1 A_GiveInventory("RisingFistFlag",1)
loop
Recovery_Z:
TNT1 A 1
TNT1 A 0 A_JumpIf(z-floorz==0,"Recovered")
TNT1 A 0 A_JumpIf(momz==0,"Recovered")
goto Recovery+2

Recovered:
XH0B A 1 Offset(12,80)
XH0B A 0 A_TakeInventory("RisingFistFlag",999)
XH0B A 2 Offset(8,64)
XH0B A 2 Offset(4,48)
Goto Ready+1
NoAmmo:
XH0B A 1 ACS_NamedExecuteAlways("core_noammo",0)
Goto Ready+1
}
}

actor RisingFistAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 28
+INVENTORY.IGNORESKILL
}
actor RisingFistFlag : Inventory
{
inventory.amount 1
inventory.maxamount 70
}

actor Copy_RisingFistStart_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 ACS_NamedExecuteWithResult("cbm_cantpushwallsplayer",0,1)
//15.5 14.5//17 13//12 16
TNT1 A 0 A_ChangeVelocity(13,0,11,3)
TNT1 A 0 A_SetArg(1,angle)
TNT1 A 0 A_SetArg(4,momz*100000)
TNT1 A 0 A_SetArg(3,momy*100000)
TNT1 A 0 A_SetArg(2,momx*100000)
TNT1 A 0 A_SpawnItemEx("Copy_RisingFistWarper",0,0,0,0,0,0,30,1)
TNT1 A 0 A_SpawnItemEx("Copy_RisingFistWarper",0,0,0,0,0,0,210,1)
stop
}
}

actor Copy_RisingFistH_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_SpawnItemEx("Copy_RisingFistHitbox",0,0,32,30,0,2,Args[1],4+32)
TNT1 A 0 A_JumpIf(CallACS("core_checkrune",RUNE_SPREAD,0),"PickupR")
stop
PickupR:
TNT1 A 0 A_SpawnItemEx("Copy_RisingFistHitbox",0,0,32,32,0,2,Args[1]+25,4+32)
TNT1 A 0 A_SpawnItemEx("Copy_RisingFistHitbox",0,0,32,32,0,2,Args[1]-25,4+32)
stop
}
}
actor Copy_RisingFistH_P2 : Copy_RisingFistH_P
{
States
{
Pickup:
TNT1 A 0 A_JumpIf(CallACS("cbm_IsDashingDisabled"),2)
TNT1 A 0 A_ChangeVelocity(Args[2]*0.00001,Args[3]*0.00001,Args[4]*0.00001,CVF_REPLACE)
TNT1 A 0
goto Super::Pickup
}
}

actor DeathRisingFistHit : Basic_DeathFling_H{Args 18,90,0}

actor Copy_RisingFistHitbox : ProjSpawnFuncActor
{
PROJECTILE
damagetype "RisingFist"
Obituary "$OB_RISINGFIST"
+THRUACTORS
+DONTBLAST
+DONTREFLECT
ReactionTime 1
damage (0)
radius 4
height 4
Speed 60
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_CountDown
wait
Death:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("Copy_RisingFistHitboxFX",0,0,0,0,0,0,0,1)
TNT1 A 0 A_Explode(27,56,0,0,28)
TNT1 A 2 A_Explode(37,56,0,0,57)
stop
}
}

actor Copy_RisingFistHitboxFX : BasicGraphicEffect
{
+FORCEXYBILLBOARD
+BRIGHT
Scale 1.0
States
{
SpawnFrame:
XH0B RS 2
stop
}
}


actor Copy_RisingFistWarper : BasicGraphicEffect
{
+THRUACTORS
+NOTIMEFREEZE
RenderStyle None
ReactionTime 12
States
{
SpawnFrame:
TNT1 A 0
Goto Shield
Shield:
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
TNT1 A 0 A_Warp(AAPTR_TARGET,64,0,16,15+CallACS("core_checkrune",RUNE_SPREAD,2)*15,WARPF_USECALLERANGLE|WARPF_NOCHECKPOSITION|WARPF_INTERPOLATE)//4+8+16
TNT1 A 0 A_SpawnItemEx("Copy_RisingFistWarperFX",0,0,0,0,0,1,0,1)
TNT1 A 1 A_CountDown
loop
Death:
TNT1 A 1
stop
}
}

actor Copy_RisingFistWarperFX : BasicGraphicEffect
{
+FORCEXYBILLBOARD
+BRIGHT
Speed 40
States
{
SpawnFrame:
TNT1 A 0
XH0B R 0 A_SetScale(1.0,2.0)
XH0B RRRRRRRRRR 1 A_SetScale(ScaleX - 0.1,ScaleY - 0.1)
stop
}
}
