DECLARE_BONUS(swordreversebonus, "Sword Disarm!", 100)
DECLARE_BONUS(staffreversebonus, "Staff Disarm!", 100)
DECLARE_BONUS(reverseko, "Reversal KO!", 100)
+// The following five should be kept in that order
DECLARE_BONUS(solidhit, "Solid Hit!", 10)
DECLARE_BONUS(twoxcombo, "2X Combo!", 20)
DECLARE_BONUS(threexcombo, "3X Combo!", 40)
else return 0;
}
-void SolidHitBonus(){
- if(bonustime<1.5&&(bonus==fourxcombo||bonus==megacombo)){
- award_bonus(0, megacombo);
- }
- else if(bonustime<1.5&&bonus==threexcombo){
- award_bonus(0, fourxcombo);
- }
- else if(bonustime<1.5&&bonus==twoxcombo){
- award_bonus(0, threexcombo);
- }
- else if(bonustime<1.5&&bonus==solidhit){
- award_bonus(0, twoxcombo);
- }
- else {
- award_bonus(0, solidhit);
- }
+static void
+SolidHitBonus(int playerid)
+{
+ if (bonustime < 1.5 && bonus >= solidhit && bonus <= megacombo)
+ award_bonus(playerid, bonus == megacombo ? bonus : bonus + 1);
+ else
+ award_bonus(playerid, solidhit);
}
void Person::DoBlood(float howmuch,int which){
victim->Puff(head);
victim->DoDamage(damagemult*100/victim->protectionhead);
- if(id==0){
- SolidHitBonus();
- }
+ SolidHitBonus(id);
}
}
victim->Puff(head);
victim->DoDamage(damagemult*150/victim->protectionhead);
- if(victim->damage>victim->damagetolerance){
+ if(victim->damage>victim->damagetolerance)
award_bonus(id, style);
- }
- else if(id==0){
- SolidHitBonus();
- }
+ else
+ SolidHitBonus(id);
}
}
victim->Puff(head);
victim->DoDamage(damagemult*150/victim->protectionhead);
- if(victim->damage>victim->damagetolerance){
+ if(victim->damage>victim->damagetolerance)
award_bonus(id, style);
- }
- else if(id==0){
- SolidHitBonus();
- }
+ else
+ SolidHitBonus(id);
}
}
for(i=0;i<victim->skeleton.num_joints;i++){
victim->skeleton.joints[i].velocity+=relative*damagemult*20;
}
- if(id==0&&!victim->dead){
- SolidHitBonus();
- }
+ if(!victim->dead)
+ SolidHitBonus(id);
victim->Puff(abdomen);
victim->DoDamage(damagemult*20/victim->protectionhigh);
victim->Puff(abdomen);
victim->DoDamage(damagemult*60/victim->protectionhigh);
- if(id==0){
- SolidHitBonus();
- }
+ SolidHitBonus(id);
}
}
victim->Puff(abdomen);
victim->DoDamage(damagemult*60/victim->protectionhigh);
- if(id==0){
- SolidHitBonus();
- }
+ SolidHitBonus(id);
}
}
relative.y=0;
Normalise(&relative);
- if(id==0){
- SolidHitBonus();
- }
+ SolidHitBonus(id);
if(animation[victim->targetanimation].height==lowheight){
if(Random()%2){
victim->DoDamage(damagemult*30/victim->protectionlow);
}
- if(id==0){
- SolidHitBonus();
- }
+ SolidHitBonus(id);
}
}
//DoDamage(100);
RagDoll(0);
skeleton.spinny=0;
- if(id!=0)SolidHitBonus();
+ SolidHitBonus(!id); // FIXME: tricky id
}
if(feint){
escapednum++;
//DoDamage(100);
RagDoll(0);
skeleton.spinny=0;
- if(id!=0)SolidHitBonus();
+ SolidHitBonus(!id); // FIXME: tricky id
}
if(feint){
escapednum++;