The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script Trying to have ability work off of a point system

Notices
For all updates, view the main page.

Binary ROM Hacking Need a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old November 10th, 2020 (6:10 AM).
grazid grazid is offline
 
Join Date: Sep 2020
Posts: 15
I'm using the ability competitive to utilize a variable that goes up when the Pokemon gets hit. However, when the Pokemon would get above +6 in a stat then the game freezes. I'm using CFRU and editing in the file ability_battle_effects with bideDmg as the variable.

Code:
			case ABILITY_COMPETITIVE:
				if (MOVE_HAD_EFFECT
				&& TOOK_DAMAGE(bank)
				&& BATTLER_ALIVE(bank)
				&& gBattleMons[bank].statStages[STAT_SPATK - 1] < 12)
				{
				gBattleScripting.bideDmg += 1;
				}
				if (gBattleScripting.bideDmg > 1)
				{	gBattleScripting.statChanger = STAT_SPATK | INCREASE_1;
					BattleScriptPushCursor();
					gBattlescriptCurrInstr = BattleScript_TargetAbilityStatRaise;
					effect++;
				}
				break;
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 9:16 AM.