diff --git a/data/trophies/trophies.json b/data/trophies/trophies.json index 26496a6..e1a69d7 100644 --- a/data/trophies/trophies.json +++ b/data/trophies/trophies.json @@ -144,6 +144,12 @@ "description" : "Be killed by a missile that was meant for someone else", "value" : "TROPHY_SILVER" }, + { + "id" : "BODYGUARD", + "title" : "The bodyguard", + "description" : "Kill an enemy with a missile intended for another", + "value" : "TROPHY_BRONZE" + }, { "id" : "_CHALLENGE_25", "title" : "", @@ -246,7 +252,7 @@ { "id" : "EPIC_KILL_13", "title" : "Yippie-ki-yay", - "description" : "Destroy 13 or more enemies in an epic battle without being killed", + "description" : "Destroy 13 or more enemies in an epic battle, without being killed", "value" : "TROPHY_SILVER", "stat" : "STAT_EPIC_KILL_STREAK", "statValue" : 13 diff --git a/src/battle/bullets.c b/src/battle/bullets.c index fbe0225..cc47f04 100644 --- a/src/battle/bullets.c +++ b/src/battle/bullets.c @@ -212,9 +212,16 @@ static void checkCollisions(Bullet *b) { e->killedBy = b->owner; - if (b->type == BT_MISSILE && e == player && b->target != player) + if (b->type == BT_MISSILE && b->target != e) { - awardTrophy("TEAM_PLAYER"); + if (e == player) + { + awardTrophy("TEAM_PLAYER"); + } + else if (b->owner == player) + { + awardTrophy("BODYGUARD"); + } } }