;; _

;; apply playermodel only on ct's

modify:
{
	match:
	{
		"targetname" "Player_Skin_Trigger"
		"classname" "trigger_multiple"
	}
	delete:
	{
		"OnStartTouch" "!activator,AddOutput,modelindex 363,0.05,-1"
	}
	insert:
	{
		"OnStartTouch" "!activator,AddOutput,modelindex 363,0,-1"
	}
}



;; v1 stripper fix 3 changes

modify:
{
	match:
	{
		"classname" "logic_auto"
		"hammerid" "563350"
	}
	insert:
	{
		"OnNewGame" "Server,Command,say >> stripper fix 3  <<,12,1"
	}
}

;; Fixed teleport bug on stage 3 where there was a 1 second window to get stuck at the uchiha hideout

modify:
{
	match:
	{
		"targetname" "l3_itachi_hp_6_1"
		"classname" "func_physbox_multiplayer"
	}
	delete:
	{
		"OnBreak" "l3_itachi_teleport_6_1_t,Disable,,27,1"
		"OnBreak" "l3_itachi_teleport_6_1_ct,Disable,,27,1"
	}
	insert:
	{
		"OnBreak" "l3_itachi_teleport_6_1_t,Disable,,30,1"
		"OnBreak" "l3_itachi_teleport_6_1_ct,Disable,,30,1"
	}
}

;; Decreased kasekage fire damage and burn time on stage 2 bossfight

modify:
{
	match:
	{
		"targetname" "l2_kasekage_burn_7_1"
		"classname" "trigger_hurt"
	}
	replace:
	{
		"damage" "15"
	}
	delete:
	{
		"OnHurtPlayer" "!activator,IgniteLifetime,5,0,-1"
	}
	insert:
	{
		"OnHurtPlayer" "!activator,IgniteLifetime,2,0,-1"
	}
}

;; Decreased tenten nohit bomb explosion time

modify:
{
	match:
	{
		"targetname" "tentenBombRelay"
		"classname" "logic_relay"
	}
	delete:
	{
		"OnSpawn" "tentenBombPhysbox,Break,,3,-1"
	}
	insert:
	{
		"OnSpawn" "tentenBombPhysbox,Break,,1,-1"
	}
}


;; v1 stripper fix 2 changes


;; hopefully fixed bug by killing the skin invis relay. This one i do not fully understand and hope it fixes it. I assume the relay call stack does not reset on death for !activator and the dead item user remains invisible

modify:
{
	match:
	{
		"origin" "-9208 15336 3080"
		"classname" "logic_auto"
		"hammerid" "563350"
	}
	insert:
	{
		"OnNewGame" "disable_render_skin,Kill,,30,1"
	}
}

;; also making the skin invis relays retrigger fast for the 30 secs

modify:
{
	match:
	{
		"targetname" "disable_item_skin"
		"classname" "logic_relay"
	}
	replace:
	{
		"spawnflags" "2"
	}
}

modify:
{
	match:
	{
		"targetname" "disable_render_skin"
		"classname" "logic_relay"
	}
	replace:
	{
		"spawnflags" "2"
	}
}

;; delete the human to kunai skin modelindex for better visability (also cleans weapons atleast on singleplayer).
;; TODO: Add script to iterate over activator weapons and disable render that way? Reason: immersion

modify:
{
	match:
	{
		"targetname" "disable_item_skin"
		"classname" "logic_relay"
	}
	delete:
	{
		"OnUser1" "!activator,AddOutput,modelindex 521,0.2,-1"
	}
}

;; fixed bug where the amaterasu damage filter accidentally overwrote the null damage filter for default humans / other one for items

modify:
{
	match:
	{
		"targetname" "l3_tele_8_1_ct"
		"classname" "trigger_teleport"
	}
	delete:
	{
		"OnStartTouch" "!activator,SetDamageFilter,,0,-1"
	}
	insert:
	{
		"OnStartTouch" "!activator,SetDamageFilter,,8,-1"
	}
}

modify:
{
	match:
	{
		"targetname" "l3_tele_8_2_ct"
		"classname" "trigger_teleport"
	}
	delete:
	{
		"OnStartTouch" "!activator,SetDamageFilter,filter_t_no,0,-1"
	}
	insert:
	{
		"OnStartTouch" "!activator,SetDamageFilter,filter_t_no,8,-1"
	}
}

;; do the same from above also for the case of the sasori boss

modify:
{
	match:
	{
		"targetname" "BossEnds_Case"
		"classname" "logic_case"
	}
	delete:
	{
		"OnCase02" "l2_clearFilter_8_1,Enable,,5,1"
	}
	insert:
	{
		"OnCase02" "l2_clearFilter_8_1,Enable,,11,1"
	}
}

;; fixed bug where i accidentally killed the last push from level 3

modify:
{
	match:
	{
		"targetname" "BossEnds_Case"
		"classname" "logic_case"
	}
	delete:
	{
		"OnCase03" "l3_push_*,Kill,,0,1"
	}
	insert:
	{
		"OnCase03" "l3_push_relay_7_1,Kill,,0,1"
		"OnCase03" "l3_push_7_1,Kill,,0,1"
	}
}


;; v1 stripper fix 1 changes


;; vis changes


;; fix global teleports to reset rendermode, speed and modelscale
;; all items which are hit should call the norender loop each 15 secs (disable_render_skin)

modify:
{
	match:
	{
		"targetname" "global_Boss_Teleport_ct"
		"classname" "trigger_teleport"
	}
	insert:
	{
		"OnStartTouch" "speedmod,ModifySpeed,1,0,-1"
		"OnStartTouch" "!activator,AddOutput,rendermode 0,0,-1"
		"OnStartTouch" "!activator,AddOutput,renderfx 0,0,-1"
		"OnStartTouch" "!activator,SetModelScale,1,0,-1"
	}
}

modify:
{
	match:
	{
		"targetname" "global_Boss_Teleport_t"
		"classname" "trigger_teleport"
	}
	insert:
	{
		"OnStartTouch" "speedmod,ModifySpeed,1,0,-1"
		"OnStartTouch" "!activator,AddOutput,rendermode 0,0,-1"
		"OnStartTouch" "!activator,AddOutput,renderfx 0,0,-1"
		"OnStartTouch" "!activator,SetModelScale,1,0,-1"
	}
}

modify:
{
	match:
	{
		"origin" "-12048 -3960 3216"
		"classname" "trigger_teleport"
		"hammerid" "4204570"
	}
	delete:
	{
		"OnStartTouch" "speedmod,ModifySpeed,1,0,-1"
		"OnStartTouch" "!activator,AddOutput,rendermode 0,0,-1"
		"OnStartTouch" "!activator,AddOutput,renderfx 0,0,-1"
		"OnStartTouch" "!activator,SetModelScale,1,0,-1"
	}
}

;; better also reset renderfx on spawn

modify:
{
	match:
	{
		"targetname" "spawnroom_reset_trigger"
		"classname" "trigger_multiple"
	}
	insert:
	{
		"OnStartTouch" "!activator,AddOutput,renderfx 0,0,-1"
	}
}


;; gameplay changes


;; reduced sasukes dash speed from 512 to 256

modify:
{
	match:
	{
		"targetname" "sasuke_dash_push"
		"classname" "trigger_push"
	}
	replace:
	{
		"speed" "256"
	}
}

;; increased tsunades heal ticks from -16 to -32

modify:
{
	match:
	{
		"targetname" "tsunade_heal_hurt"
		"classname" "trigger_hurt"
	}
	replace:
	{
		"damage" "-32"
		"damagecap" "-32"
	}
}

;; reduced deidara c3 explosion magnitude from 400 to 300

modify:
{
	match:
	{
		"targetname" "c3_bomb_7_1_explosion"
		"classname" "env_explosion"
	}
	replace:
	{
		"iMagnitude" "300"
	}
}

;; reduced deidara t playable c1 spider explosion magnitude from 220 to 150

modify:
{
	match:
	{
		"targetname" "c1_explosion"
		"classname" "env_explosion"
	}
	replace:
	{
		"iMagnitude" "150"
	}
}

;; reduced deidara last bird explosion magnitude from 500 to 250

modify:
{
	match:
	{
		"targetname" "l1_bird_explosion"
		"classname" "env_explosion"
	}
	replace:
	{
		"iMagnitude" "250"
	}
}

;; reduced sasori ironsand shower explosion magnitude from 200 to 100

modify:
{
	match:
	{
		"targetname" "Ironsand_Explosion_A"
		"classname" "env_explosion"
	}
	replace:
	{
		"iMagnitude" "100"
	}
}

modify:
{
	match:
	{
		"targetname" "Ironsand_Explosion_B"
		"classname" "env_explosion"
	}
	replace:
	{
		"iMagnitude" "100"
	}
}

modify:
{
	match:
	{
		"targetname" "Ironsand_Explosion_C"
		"classname" "env_explosion"
	}
	replace:
	{
		"iMagnitude" "100"
	}
}

modify:
{
	match:
	{
		"targetname" "Ironsand_Explosion_D"
		"classname" "env_explosion"
	}
	replace:
	{
		"iMagnitude" "100"
	}
}

modify:
{
	match:
	{
		"targetname" "Ironsand_Explosion_E"
		"classname" "env_explosion"
	}
	replace:
	{
		"iMagnitude" "100"
	}
}

modify:
{
	match:
	{
		"targetname" "Ironsand_Explosion_F"
		"classname" "env_explosion"
	}
	replace:
	{
		"iMagnitude" "100"
	}
}

;; reduced sasori ironsand unleash hurt damage from 300 to 200
;; added bosshealth subtraction even if hurt triggers every ct because of damage filter. Lore: Ability also hurts him

modify:
{
	match:
	{
		"targetname" "is2_hurt_7_1"
		"classname" "trigger_hurt"
	}
	replace:
	{
		"damage" "200"
	}
	insert:
	{
		"OnHurtPlayer" "Boss_Health,Subtract,50,0,-1"
	}
}

;; reduced sasori2 physbox escape health per ct going to bossroom from 200 to 100

modify:
{
	match:
	{
		"targetname" "l2_tele_trigger_6_1_out"
		"classname" "trigger_teleport"
	}
	delete:
	{
		"OnStartTouch" "l2_sasori_physbox_8_1,AddHealth,200,0,-1"
	}
	insert:
	{
		"OnStartTouch" "l2_sasori_physbox_8_1,AddHealth,100,0,-1"
	}
}

;; added itachi bosshealth subtraction for amaterasu even if hurt triggers every ct because of damage filter. Lore: Ability also hurts him

modify:
{
	match:
	{
		"targetname" "l3_susano_hurt_7_1"
		"classname" "trigger_hurt"
	}
	insert:
	{
		"OnHurtPlayer" "Boss_Health,Subtract,150,0,-1"
	}
}

