If I were to answer specifically your question, I would suggest some code like this, to be pasted somewhere:
Code:
class PokeBattle_Battler
alias __Messi_count__pbFaint pbFaint
def pbFaint(*args)
__Messi_count__pbFaint(*args)
$game_variables[XXX] = 0 if !$game_variables[XXX]
$game_variables[XXX] += 1 if [email protected]?(self.index) && self.isSpecies?(:GEODUDE)
end
end
Basically it rewrites pbFaint so that whenever you kill an opposing Geodude, it increments Game Variable XXX (where XXX needs to be replaced with a specific reserved number).
But I suspect that, what you really want, is an achievement for killing a certain number of Geodude's.
In the file Achievement Procs, find the function
and add this line at the end:
Code:
Achievements.incrementProgress("KILLED_GEODUDE",1) if [email protected]?(self.index) && self.isSpecies?(:GEODUDE)
This one increments the achievement "KILLED_GEODUDE". So we need to create that achievement. Go to the file Achievement_Module, and find the definition of the list:
@achievementList
Go at the end of its definition:
Code:
"FAINTED_POKEMON"=>{
"id"=>13,
"name"=>"I Hope You're Not Doing a Nuzlocke",
"description"=>"Have your Pokémon faint.",
"goals"=>[100,250,500]
}
}
There are two consecutive "}" symbols; you need to define a new achievement between them:
Code:
"FAINTED_POKEMON"=>{
"id"=>13,
"name"=>"I Hope You're Not Doing a Nuzlocke",
"description"=>"Have your Pokémon faint.",
"goals"=>[100,250,500]
},
# NEW ACHIEVEMENT (be careful to add a comma at the end of the previous line)
"KILLED_GEODUDE"=>{
"id"=>14,
"name"=>"I Hate Geodude",
"description"=>"Knock out many Geodude's.",
"goals"=>[10, 25, 50]
}
}
So now you will unlock an achiement for knocking out 10, 25 and 50 Geodudes.