From 3e4ee61b5187d086afa73cd797e0b7e8537d32ea Mon Sep 17 00:00:00 2001
From: Nemo Ma <nemoma@nmonolith.com>
Date: Thu, 17 Aug 2023 10:12:43 -0400
Subject: [PATCH] Interim 4

Add: A mix of the 4 joke items will produce a mine item with 2 different outcomes, one to inflict a batch of statuses, the other will act as a miracle mine and kill the opposing player, also trigger an Easter egg music change.
---
 gamedata/cache/audio_1.php        |  6 ++++++
 gamedata/cache/mixitem_1.php      |  2 ++
 gamedata/cache/randomFS_1.php     |  6 ++++++
 gamedata/cache/style_20190718.css |  2 +-
 gamedata/cache/tooltip_1.php      |  9 +++++++++
 include/game/item.func.php        |  8 ++++++++
 include/game/itemmain.func.php    | 19 ++++++++++++++++++-
 include/game/itemmix.func.php     | 23 +++++++++++++++++++++++
 8 files changed, 73 insertions(+), 2 deletions(-)

diff --git a/gamedata/cache/audio_1.php b/gamedata/cache/audio_1.php
index 432dca4..d23897e 100644
--- a/gamedata/cache/audio_1.php
+++ b/gamedata/cache/audio_1.php
@@ -40,6 +40,7 @@ $bgmbook = Array
 	'realcrimzure' => Array(17),
 	'pls33' => Array(21),
 	'introduction' => Array(22),
+	'notYMCA' => Array(25),
 );
 
 # 所有bgm编号清单:
@@ -170,6 +171,11 @@ $bgmlist = Array
 		'url' => 'https://res.dts.gay/BGM/Skaven252-MMC-2023-03_LifeAsAHole.mp3',
 		'type' => 'audio/mpeg',
 	),
+	25 => Array(
+		'name' => 'Turbo - Ikouze Paradise - Eurobeat Version',
+		'url' => 'https://res.dts.gay/BGM/ikouze_paradise_eurobeat.mp3',
+		'type' => 'audio/mpeg',
+	)
 );
 
 ?>
diff --git a/gamedata/cache/mixitem_1.php b/gamedata/cache/mixitem_1.php
index 00bdf52..d71aa35 100644
--- a/gamedata/cache/mixitem_1.php
+++ b/gamedata/cache/mixitem_1.php
@@ -126,6 +126,8 @@ $mixinfo = array
 	array('class' => 'item', 'stuff' => array('水','黑色方块','白色雏菊'),'result' => array('仪水镜','Y',1,1,),),
 	array('class' => 'item', 'stuff' => array('风祭河水','仪水镜','白色雏菊','黑色雏菊'),'result' => array('八咫镜','DH',1,1,'b'),),
 	array('class' => 'item', 'stuff' => array('乌黑的脸','乌黑的脸','乌黑的脸','乌黑的脸','乌黑的脸'),'result' => array('😂我太酷啦!😂','Y',1,1,'xX'),),
+	array('class' => 'item', 'stuff' => array('【我太帅啦!】','【我太棒啦!】','【我太牛啦!】','【我太强啦!】'),'result' => array('「我头四」','TNe',300,1,'eipuz'),),
+	array('class' => 'item', 'stuff' => array('【我太帅啦!】','【我太棒啦!】','【我太牛啦!】','【我太强啦!】','神秘条件'),'result' => array('破则战术「我头四」','TNd',1,1,'xX'),),
 	
 	array('class' => 'pokemon', 'stuff' => array('《小黄的草帽》','《小黄的钓鱼竿》','《小黄的行军靴》'),'result' => array('《小黄的精灵球》','WC',386,'∞',),),
 	array('class' => 'pokemon', 'stuff' => array('《小黄的精灵球》','《小黄的收服特训》'),'result' => array('《小黄的超级球》','WC',386,'∞','Zir'),),
diff --git a/gamedata/cache/randomFS_1.php b/gamedata/cache/randomFS_1.php
index 8d4ef76..0d06191 100644
--- a/gamedata/cache/randomFS_1.php
+++ b/gamedata/cache/randomFS_1.php
@@ -15,6 +15,12 @@ EOT;
 $item = <<<EOT
 针线包,Y,100,1,,
 磨刀石,Y,100,1,,
+针线包,Y,150,1,,
+磨刀石,Y,150,1,,
+针线包,Y,200,1,,
+磨刀石,Y,200,1,,
+针线包,Y,777,1,,
+磨刀石,Y,777,1,,
 ◆火之碎片,HB,13337,1,,
 银白盒子,ps,1,1,,
 游戏王卡包,ygo,1,1,,
diff --git a/gamedata/cache/style_20190718.css b/gamedata/cache/style_20190718.css
index e6721a9..7bb5c8f 100644
--- a/gamedata/cache/style_20190718.css
+++ b/gamedata/cache/style_20190718.css
@@ -747,7 +747,7 @@ input.range{
 .shoprow .leftbox{
 	width:50px;float:left;margin-right:5px;
 }
-.shoprow .leftbox input{width:50px;}
+.shoprow .leftbox input{min-width:50px;}
 .shoprow .rightbox{
 	width:60px;float:right;
 }
diff --git a/gamedata/cache/tooltip_1.php b/gamedata/cache/tooltip_1.php
index 6982b61..cd01d6d 100644
--- a/gamedata/cache/tooltip_1.php
+++ b/gamedata/cache/tooltip_1.php
@@ -72,10 +72,19 @@ $tps_name = Array
 	'随机数之神的神力' => 2,'随机数之神的震撼' => 2,'随机数之神的摄理' => 2,'随机数之神的恶戏' => 2,
 	# 福袋惩罚物品
 	'乌黑的脸' => Array('title'=>"贪 心 不 足 蛇 吞 象"),
+	# 一个特判 - 这游戏中不会出现叫做【神秘条件】的物品吧……
+	'神秘条件' => Array('class'=>'lime', 'title'=>"要合成该物品需要满足一个特定的神秘条件。"),
 	# OTHERS
 	'😂我太酷啦!😂' =>Array('class'=>'rainbow', 'title'=>"一个笑哭黄豆模样的按钮,按下后立刻将自己炸成一朵烟花(自身死亡)。"),
+	'【我太帅啦!】' =>Array('title'=>"这是一个整蛊自己的按钮。将会把你的背包替换成一堆无用的游戏王卡片。"),
+	'【我太棒啦!】' =>Array('title'=>"这是一个整蛊自己的按钮。将会削掉你的生命和体力,并将它们转化为等效补给。"),
+	'【我太强啦!】' =>Array('title'=>"这是一个整蛊自己的按钮。你会向众人宣言你很强,然后为了证明你的实力,你的最大生命值将会下降100点。"),
+	'【我太牛啦!】' =>Array('title'=>"这是一个整蛊自己的按钮。将会向众人宣言你很牛,然后为了证明这一点,你会将你的最大生命值和最大体力值变成金钱。"),
+	'「我头四」' =>Array('title'=>"使用四种不同的整蛊道具合成的强力彩虹陷阱,踩到的玩家将受到300点固定伤害并变得遍体鳞伤。但如果满足某个条件的话……"),
+	'破则战术「我头四」' =>Array('class'=>'minirainbow', 'title'=>"满足某个特定条件后,合成的「我头四」便可以一击必杀。"),
 	'神秘的「🥚」' =>Array('class'=>'glitch1', 'title'=>"一个神秘的蛋状物品,你潜意识觉得它可能会很大条,而且觉得它像是什么哺乳生物产生的……"),
 	'✦ЦВЙΨХЩΗЖФ✦' =>Array('class'=>'spitem2', 'title'=>"看起来是一个黑色的,安静的盒子,里面可能放着好东西。"),
+	'✦ЦΨЙЩЦΑПΨЁВЦЩΨ✦' =>Array('class'=>'spitem2', 'title'=>"看起来是一个橙色的,骚动的盒子,里面可能放着莫名其妙的东西。"),
 );
 
 $tps_name_lore = Array
diff --git a/include/game/item.func.php b/include/game/item.func.php
index e10e812..a50dcc4 100644
--- a/include/game/item.func.php
+++ b/include/game/item.func.php
@@ -2918,6 +2918,8 @@ function itemuse($itmn,&$data=NULL) {
 			# Destroy the item.
 			//$itm = $itmk = $itmsk = '';
 			//$itme = $itms = 0;
+			# Sign
+			$clbpara['iAmHandsome'] += 1;
 		} elseif($itm == '【我太棒啦!】') {
 			# Joke Item, shred the user's HP and SP, then convert them into health item.
 			$log .= "按下这个按钮后,你突然觉得你很棒,<br>
@@ -2939,6 +2941,8 @@ function itemuse($itmn,&$data=NULL) {
 			# Destroy the item.
 			$itm = $itmk = $itmsk = '';
 			$itme = $itms = 0;
+			# Sign
+			$clbpara['iAmGreat'] += 1;
 		} elseif($itm == '【我太强啦!】') {
 			# Joke Item, Alerting the position of the user by generate a chatlog and decrease their $mhp by 100.
 			if ($mhp < 100) {
@@ -2956,6 +2960,8 @@ function itemuse($itmn,&$data=NULL) {
 				# Destroy the item.
 				$itm = $itmk = $itmsk = '';
 				$itme = $itms = 0;
+				# Sign
+				$clbpara['iAmStrong'] += 1;
 			}
 		} elseif($itm == '【我太牛啦!】') {
 			# Joke Item, Aleating the position of the user, then turn their $mhp and $msp into money.
@@ -2976,6 +2982,8 @@ function itemuse($itmn,&$data=NULL) {
 			# Destroy the item.
 			$itm = $itmk = $itmsk = '';
 			$itme = $itms = 0;
+			# Sign
+			$clbpara['iAmRich'] += 1;
 		} else {
 			$log .= " <span class=\"yellow\">$itm</span> 该如何使用呢?<br>";
 		}
diff --git a/include/game/itemmain.func.php b/include/game/itemmain.func.php
index e47265b..8057561 100644
--- a/include/game/itemmain.func.php
+++ b/include/game/itemmain.func.php
@@ -86,6 +86,23 @@ function calc_trap_damage(&$pa,$pd=NULL,$playerflag=0,$selflag=0)
 		$damage = $pa['hp'];
 		return $damage;
 	}
+	// 普通普通我头四
+	if($pa['itmk0'] == 'TOe'){
+		$log .= "<br>突然从地上窜出了四个大只佬!<br>他们似乎对你做了什么不可描述的事情……<br>
+		总之在他们心满意足地沉回地面之后,你头晕目眩地站了起来。<br>";
+		$pa['inf'] = 'hbafpuie';
+		$damage = 300;
+		return $damage;
+	}
+	// 超级无敌我头四
+	if($pa['itmk0'] == 'TOd')
+	{
+		$log .= "<br>一阵强劲的音乐突然响起,似乎是一首最近的歌,但有着一种老歌的气息……<br>
+		<br><span class=\"minirainbow\">一种很帅,很强,很棒,很牛的力量将你的生命改写成了虚无!</span><br>";
+		$pa['clbpara']['event_bgmbook'] = Array('notYMCA');
+		$damage = $pa['hp'];
+		return $damage;
+	}
 	// 随机数大神的陷阱
 	if($pa['itmk0'] == 'TO8')
 	{ 
@@ -114,7 +131,7 @@ function calc_trap_damage(&$pa,$pd=NULL,$playerflag=0,$selflag=0)
 function check_trap_def_event(&$pa,$damage,$playerflag=0,$selflag=0)
 {
 	# 奇迹雷、神力雷不能迎击
-	if($pa['itmk0'] == 'TOc' || $pa['itmk0'] == 'TO8') return $damage;
+	if($pa['itmk0'] == 'TOc' || $pa['itmk0'] == 'TO8' || $pa['itmk0'] == 'TOd') return $damage;
 	# 检查是否有迎击属性
 	include_once GAME_ROOT.'./include/game/revattr.func.php';
 	if(empty($pa['ex_keys'])) $pa['ex_keys'] = array_merge(\revattr\get_equip_ex_array($pa),\revattr\get_wep_ex_array($pa));
diff --git a/include/game/itemmix.func.php b/include/game/itemmix.func.php
index 93051ae..a53a9d9 100644
--- a/include/game/itemmix.func.php
+++ b/include/game/itemmix.func.php
@@ -447,6 +447,29 @@ function itemmix_events(&$data=NULL)
 		啊……?<br>";
 	}
 
+	# If one attempts to mix 我头四, check if they have used all 4 我太XX item, if they do, replace the result with the miracle mine, if not, then it's just a normal mine.
+	if($itm0 =='「我头四」'){
+		# Check if all 4 「我太XX」 have been used.
+		if($clbpara['iAmHandsome'] > 0 && $clbpara['iAmGreat'] > 0 && $clbpara['iAmRich'] > 0 && $clbpara['iAmStrong'] > 0){
+			$log .= "<span class='minirainbow'>很帅,很强,很棒,很牛的你拿起了你刚刚合成的这个名为「我头四」的陷阱。<br>
+			你手上的东西响应着你的灵魂,竟然产生了变化!</span><br>";
+
+			$itm0 = '破则战术「我头四」';
+			$itme0 = 1;
+			$itmk0 = 'TNd';
+			$itmsk0 = 'xX';
+
+			$log .= "但是你的预感告诉你,要再做一个这样的东西,<br><span class='minirainbow'>恐怕需要重新将你之前做过的某些事情做一遍了……</span><br>";
+			# Clear the 4「我太XX」 $clbpara values to prevent abuse of this trap.
+			$clbpara['iAmHandsome'] = 0;
+			$clbpara['iAmGreat'] = 0;
+			$clbpara['iAmRich'] = 0;
+			$clbpara['iAmStrong'] = 0;
+		}else{
+			# Output a hint about the above trap.
+			$log .= "<span class='lime'>你捧着这个刚刚合成出来的陷阱……<br>你有一种预感,它可以在特定条件下变成一个更强的东西,但那条件是什么呢?</span><br>";
+		}
+	}
 	return;
 }
 
-- 
2.24.1