Added REVENGE trophy.

This commit is contained in:
Steve 2016-05-24 16:16:34 +01:00
parent f49ceedb85
commit 66263396d9
3 changed files with 17 additions and 0 deletions

View File

@ -305,5 +305,11 @@
"stat" : "STAT_ENEMIES_SURRENDERED", "stat" : "STAT_ENEMIES_SURRENDERED",
"statValue" : 50, "statValue" : 50,
"hidden" : 1 "hidden" : 1
},
{
"id" : "REVENGE",
"title" : "Revenge",
"description" : "During an epic battle, kill an enemy that previously killed you",
"value" : "TROPHY_BRONZE"
} }
] ]

View File

@ -230,6 +230,16 @@ static void checkCollisions(Bullet *b)
awardTrophy("BODYGUARD"); awardTrophy("BODYGUARD");
} }
} }
if (e == player)
{
b->owner->flags |= EF_KILLED_PLAYER;
}
if (b->owner == player && e->flags & EF_KILLED_PLAYER)
{
awardTrophy("REVENGE");
}
} }
if (b->owner == player && b->type == BT_MISSILE) if (b->owner == player && b->type == BT_MISSILE)

View File

@ -110,6 +110,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define EF_DROPS_ITEMS (2 << 24) #define EF_DROPS_ITEMS (2 << 24)
#define EF_COMMON_FIGHTER (2 << 25) #define EF_COMMON_FIGHTER (2 << 25)
#define EF_SURRENDERED (2 << 26) #define EF_SURRENDERED (2 << 26)
#define EF_KILLED_PLAYER (2 << 27)
#define AIF_NONE 0 #define AIF_NONE 0
#define AIF_FOLLOWS_PLAYER (2 << 0) #define AIF_FOLLOWS_PLAYER (2 << 0)