Examples: Trainer Battles
Section 5.B
setBattleRule("midbattleScript", {
"RoundEnd_1_foe" => {
"setChoices" => [:nickname, 2, {
"The magic-user" => "Bzzt! Too bad!",
"The wizard" => "Ding ding ding! Congratulations, you're correct."
}],
"speech" => ["Question!", "You...\nDo you know my nickname?", :Choices]
},
"ChoiceRight_nickname" => {
"setBattler" => :Opposing,
"battlerStats" => [:SPEED, 2]
},
"ChoiceWrong_nickname" => {
"setBattler" => :Opposing,
"battlerStats" => [:SPEED, -2]
},
"RoundEnd_3_foe" => {
"setChoices" => [:color, 2, {
"Pink" => "That's what I like to see in other people, but it's not what I like for myself.",
"Purple" => "Yes, a nice, deep purple...\nTruly grand, don't you think?"
}],
"speech" => ["Question!", "What is my favorite color?", :Choices]
},
"ChoiceRight_color" => {
"setBattler" => :Opposing,
"battlerStats" => [:DEFENSE, 2, :SPECIAL_DEFENSE, 2]
},
"ChoiceWrong_color" => {
"setBattler" => :Opposing,
"battlerStats" => [:DEFENSE, -2, :SPECIAL_DEFENSE, -2]
},
"RoundEnd_5_foe" => {
"setChoices" => [:age, 1, {
"16 years old" => "Hah!\nI like your answer!",
"88 years old" => "Well, you're not wrong. But you could've been a little more sensitive."
}],
"speech" => ["Question!", "All righty then... How old am I?", :Choices]
},
"ChoiceRight_age" => {
"setBattler" => :Opposing,
"battlerStats" => [:ATTACK, 2, :SPECIAL_ATTACK, 2]
},
"ChoiceWrong_age" => {
"setBattler" => :Opposing,
"battlerStats" => [:ATTACK, -2, :SPECIAL_ATTACK, -2]
},
"BeforeLastSwitchIn_foe" => "My morning tea is finally kicking in, and not a moment too soon!"
})
TrainerBattle.start(:LEADER_Opal, "Opal")Last updated