diff --git a/src/faction.c b/src/faction.c index a0ed80a..e67f96f 100644 --- a/src/faction.c +++ b/src/faction.c @@ -80,6 +80,7 @@ static void faction_sanitizePlayer(Faction* faction) { void faction_modPlayer(int f, int mod) { int i; Faction* faction, *ally, *enemy; + DEBUG("MOD: %d ALLY/ENEMY MOD: %d", mod, mod/2); if(faction_isFaction(f)) { faction = &faction_stack[f]; @@ -92,7 +93,7 @@ void faction_modPlayer(int f, int mod) { for(i = 0; i < faction->nallies; i++) { ally = &faction_stack[faction->allies[i]]; - ally->player += RNG(0, mod/2); + ally->player += RNG(0, (mod*3)/4); faction_sanitizePlayer(ally); } @@ -100,7 +101,7 @@ void faction_modPlayer(int f, int mod) { for(i = 0; i < faction->nenemies; i++) { enemy = &faction_stack[faction->enemies[i]]; - enemy->player -= MIN(1, RNG(0, mod/2)); + enemy->player -= MIN(1, RNG(0, (mod*3)/4)); faction_sanitizePlayer(enemy); } diff --git a/src/pilot.c b/src/pilot.c index 40e59aa..558a4e8 100644 --- a/src/pilot.c +++ b/src/pilot.c @@ -301,7 +301,7 @@ void pilot_hit(Pilot* p, const Solid* w, const unsigned int shooter, pilot_dead(p); /* Adjust the combat rating based on pilot mass and ditto faction. */ if(shooter == PLAYER_ID) { - mod = MIN(1, (int)sqrt(p->ship->mass/25.)); + mod = (int)MAX(1, ceil(pow(p->ship->mass, 1./3.))-1.); player_crating += MAX(1, mod); faction_modPlayer(p->faction, -mod); }