首页
社区
课程
招聘
[原创]魔性游戏-熱血!胴上げ(举高高)破解教程
发表于: 2018-3-30 13:45 4500

[原创]魔性游戏-熱血!胴上げ(举高高)破解教程

2018-3-30 13:45
4500
最近玩了一款日文游戏熱血!胴上げ,觉得挺有意思,闲来无事就研究研究随便来个破解!
废话不多说,上图:


游戏很简单,就是个无脑游戏,将人跑到空中,一直刷新最高纪录!大概玩了几把,游戏有等级系统,到达了一定经验后会升级,等级越高,将人跑出去的速度越快,抛的越高,下降的速度也越来越快!
那么就开始爆破吧!
工具:Androidkiller,Dnspy
首先用AndroidKiller将游戏反编译

反编译后发现是unity3d的游戏
接下来用工具Dnspy编译Assembly-CSharp.dll文件,整理下思路既然是居高高的游戏那就全局搜索jump试下看如图:

_tapToJumpLimit看字面意思亲点跳跃什么限制,也不知道是啥,点进去看看吧

类中Ctrl+F搜索_tapToJumpLimit



private void Start()
{
this._player = SingletonMonoBehaviour<GameManager>.Instance.Player;//首先初始化角色
this._liftLv = SingletonMonoBehaviour<GameDataManager>.Instance.LoadLiftLV();//读取上升等级LoadLiftLv();
global::Debug.Log("レベル:" + this._liftLv, null);
this._tapToJumpLimit = 0.5f;
foreach (Lift lift in this._liftList)
{
lift.Init(this._liftLv);//初始化上升等级
lift.ChangeLiftImage(LiftState.LoweringArm);//下面一帮损友手臂放下动作
}
SingletonMonoBehaviour<FallThroughCatcher>.Instance.onPressStart += this.OnPressStart;
}

点击LoadLiftLv()进去看看;

public int LoadLiftLV()
{
int result = 1;
decimal d = this.LoadExp();
int num = 0;
while ((float)num < 10f)
{
if (d >= ValueData.EXP_BORDER_LIST[num])
{
result = num + 1;
}
num++;
}
return result;
}




代码已经很清楚了,读取经验值赋值给变量d,判断是否满足升级条件,最后将最终的结果赋值给result,这个就是当前Lv等级,
继续深入分析:
我们再来看下这个类GameDataManager中文意思是游戏数据管理类,看看里面有什么东西
看到有个UpdateHighScore()方法,看上去是不是不开心更新最高分


public bool UpdateHighScore(decimal score)
{
decimal num = this.LoadHighScore();
base.Save("HIGH_SCORE_KEY", (!(num >= score)) ? score : num);
return score > num;
}


代码也很简单读取最高分,将最高分缓存到"HIGH_SCORE_KEY"参数中,这里就是修改最高分的关键点!
继续深入挖掘:
我们来挖掘下人物飞升的算法逻辑:
回到最开始_tapToJumpLimit参数,
类中Ctrl+F搜索_tapToJumpLimit上下选择



private void LateUpdate()
{
if (!SingletonMonoBehaviour<GameManager>.Instance.IsPlayingGame)
{
return;
}
if (this._player.PostionY <= this._liftLine.transform.position.y)
{
this.Toss();
}
this._player.CheckGameOver();
if (this._canTap)
{
return;
}
this._tapToJumpTime += Time.deltaTime;
if (this._tapToJumpTime >= this._tapToJumpLimit)
{
this._canTap = true;
this._tapToJumpTime = 0f;
}
}


发现这段代码,判断PostionY是否小于或则等于this._liftLine.transform.position.y,然后执行Toss();抛出方法否则就gameOver,那么我们就可以猜出如果下面的损友接住人就将起抛出,没接住就游戏结束了!
我们继续看下Toss()这个方法;


private void Toss()
{
if (this._canTap)
{
return;
}
this.PlayLiftAnimation();//执行抛出动画
float num = 1.2f + 0.05f * (float)(this._liftLv - 1);
float num2 = (num - 0.8f) * (1f - this._tapToJumpTime / this._tapToJumpLimit);
num2 += 0.8f;
this._player.Toss(num2);//
float num3 = Mathf.Min(1f, this._player.Speed / this.SPEED_LIMIT_LIST[this._liftLv - 1]);
this._tapToJumpLimit = 0.5f - 0.48f * num3;
this._canTap = true;
this._tapToJumpTime = 0f;
}


这段方法就是整个游戏最核心的算法了
_liftLv参数是当前等级
_tapToJumpTime 点击跳跃的时间
_tapToJumpLimit 点击跳跃的最大限制
_player.Speed 人物速度
this.SPEED_LIMIT_LIST[this._liftLv - 1]);最大速度

成品我就不发了,自己动手更有乐趣!


[峰会]看雪.第八届安全开发者峰会10月23日上海龙之梦大酒店举办!

最后于 2018-3-30 13:48 被wushaominkk编辑 ,原因:
收藏
免费 0
支持
分享
最新回复 (1)
雪    币: 0
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
可以啊不错
2018-7-7 09:21
0
游客
登录 | 注册 方可回帖
返回
//