Skip to content

Commit 98d0d98

Browse files
author
Turning Wheel LLC
authored
Merge pull request #813 from WALLOFJUSTICE/dev-23-q2
beta update
2 parents 7ec3479 + 5cbf752 commit 98d0d98

File tree

13 files changed

+434
-45
lines changed

13 files changed

+434
-45
lines changed

lang/en.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6205,5 +6205,6 @@ intro - God Rest Ye Merry Gentlemen by NaturesEye#
62056205
6049 View Wheel#
62066206
6050 SPECTATE#
62076207
6051 SPAWN AS GHOST#
6208+
6052 Your party has been wiped out...#
62086209

62096210
6100 end#

src/actbeartrap.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,12 +629,12 @@ void bombDoEffect(Entity* my, Entity* triggered, real_t entityDistance, bool spa
629629
if ( !strcmp(stat->name, "") )
630630
{
631631
updateEnemyBar(parent, triggered, getMonsterLocalizedName(stat->type).c_str(), stat->HP, stat->MAXHP,
632-
false, DamageGib::DMG_TODO);
632+
false, DamageGib::DMG_DEFAULT);
633633
}
634634
else
635635
{
636636
updateEnemyBar(parent, triggered, stat->name, stat->HP, stat->MAXHP,
637-
false, DamageGib::DMG_TODO);
637+
false, DamageGib::DMG_DEFAULT);
638638
}
639639
Entity* gib = spawnGib(triggered);
640640
serverSpawnGibForClient(gib);

src/actplayer.cpp

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7539,6 +7539,46 @@ void actPlayer(Entity* my)
75397539
{
75407540
hit.entity->doorHealth = 0;
75417541
}
7542+
//else if ( hit.entity->behavior == &actDoorFrame &&
7543+
// hit.entity->flags[INVISIBLE] )
7544+
//{
7545+
// // code that almost fixes door frame collision
7546+
// if ( hit.entity->yaw >= -0.1 && hit.entity->yaw <= 0.1 )
7547+
// {
7548+
// // east/west doorway
7549+
// if ( my->y < floor(hit.entity->y / 16) * 16 + 8 )
7550+
// {
7551+
// // slide south
7552+
// PLAYER_VELX = 0;
7553+
// PLAYER_VELY = .25;
7554+
// }
7555+
// else
7556+
// {
7557+
// // slide north
7558+
// PLAYER_VELX = 0;
7559+
// PLAYER_VELY = -.25;
7560+
// }
7561+
// }
7562+
// else
7563+
// {
7564+
// // north/south doorway
7565+
// if ( my->x < floor(hit.entity->x / 16) * 16 + 8 )
7566+
// {
7567+
// // slide east
7568+
// PLAYER_VELX = .25;
7569+
// PLAYER_VELY = 0;
7570+
// }
7571+
// else
7572+
// {
7573+
// // slide west
7574+
// PLAYER_VELX = -.25;
7575+
// PLAYER_VELY = 0;
7576+
// }
7577+
// }
7578+
// my->x += PLAYER_VELX;
7579+
// my->y += PLAYER_VELY;
7580+
// dist = sqrt(PLAYER_VELX * PLAYER_VELX + PLAYER_VELY * PLAYER_VELY);
7581+
//}
75427582
}
75437583
}
75447584
else

src/actthrown.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,12 +1167,12 @@ void actThrown(Entity* my)
11671167
if ( !strcmp(hitstats->name, "") )
11681168
{
11691169
updateEnemyBar(parent, hit.entity, getMonsterLocalizedName(hitstats->type).c_str(), hitstats->HP, hitstats->MAXHP,
1170-
false, DamageGib::DMG_TODO);
1170+
false, DamageGib::DMG_DEFAULT);
11711171
}
11721172
else
11731173
{
11741174
updateEnemyBar(parent, hit.entity, hitstats->name, hitstats->HP, hitstats->MAXHP,
1175-
false, DamageGib::DMG_TODO);
1175+
false, DamageGib::DMG_DEFAULT);
11761176
}
11771177
}
11781178

src/magic/actmagic.cpp

Lines changed: 49 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,11 @@ void actMagicMissile(Entity* my) //TODO: Verify this function.
944944

945945
// Only degrade the equipment if Friendly Fire is ON or if it is (OFF && target is an enemy)
946946
bool bShouldEquipmentDegrade = false;
947-
if ( (svFlags & SV_FLAG_FRIENDLYFIRE) )
947+
if ( parent && parent->behavior == &actDeathGhost )
948+
{
949+
bShouldEquipmentDegrade = false;
950+
}
951+
else if ( (svFlags & SV_FLAG_FRIENDLYFIRE) )
948952
{
949953
// Friendly Fire is ON, equipment should always degrade, as hit will register
950954
bShouldEquipmentDegrade = true;
@@ -1243,11 +1247,35 @@ void actMagicMissile(Entity* my) //TODO: Verify this function.
12431247
// check for magic resistance...
12441248
// resistance stacks diminishingly
12451249
int resistance = 0;
1250+
DamageGib dmgGib = DMG_DEFAULT;
1251+
real_t damageMultiplier = 1.0;
12461252
if ( hit.entity )
12471253
{
12481254
resistance = Entity::getMagicResistance(hit.entity->getStats());
1249-
1250-
// TODO - magic impact weak/strong messages?
1255+
if ( (hit.entity->behavior == &actMonster || hit.entity->behavior == &actPlayer) && hitstats )
1256+
{
1257+
damageMultiplier = Entity::getDamageTableMultiplier(hit.entity, *hitstats, DAMAGE_TABLE_MAGIC);
1258+
if ( damageMultiplier <= 0.75 )
1259+
{
1260+
dmgGib = DMG_WEAKEST;
1261+
}
1262+
else if ( damageMultiplier <= 0.85 )
1263+
{
1264+
dmgGib = DMG_WEAKER;
1265+
}
1266+
else if ( damageMultiplier >= 1.25 )
1267+
{
1268+
dmgGib = resistance == 0 ? DMG_STRONGEST : DMG_WEAKER;
1269+
}
1270+
else if ( damageMultiplier >= 1.15 )
1271+
{
1272+
dmgGib = resistance == 0 ? DMG_STRONGER : DMG_WEAKER;
1273+
}
1274+
else if ( resistance > 0 )
1275+
{
1276+
dmgGib = DMG_WEAKEST;
1277+
}
1278+
}
12511279
}
12521280

12531281
real_t spellbookDamageBonus = (my->actmagicSpellbookBonus / 100.f);
@@ -1274,7 +1302,7 @@ void actMagicMissile(Entity* my) //TODO: Verify this function.
12741302
int damage = element->damage;
12751303
damage += (spellbookDamageBonus * damage);
12761304
//damage += ((element->mana - element->base_mana) / static_cast<double>(element->overload_multiplier)) * element->damage;
1277-
damage *= Entity::getDamageTableMultiplier(hit.entity, *hitstats, DAMAGE_TABLE_MAGIC);
1305+
damage *= damageMultiplier;
12781306
damage /= (1 + (int)resistance);
12791307
hit.entity->modHP(-damage);
12801308
for (i = 0; i < damage; i += 2) //Spawn a gib for every two points of damage.
@@ -1292,12 +1320,12 @@ void actMagicMissile(Entity* my) //TODO: Verify this function.
12921320
if ( !strcmp(hitstats->name, "") )
12931321
{
12941322
updateEnemyBar(parent, hit.entity, getMonsterLocalizedName(hitstats->type).c_str(), hitstats->HP, hitstats->MAXHP,
1295-
false, DamageGib::DMG_TODO);
1323+
false, dmgGib);
12961324
}
12971325
else
12981326
{
12991327
updateEnemyBar(parent, hit.entity, hitstats->name, hitstats->HP, hitstats->MAXHP,
1300-
false, DamageGib::DMG_TODO);
1328+
false, dmgGib);
13011329
}
13021330

13031331
if ( hitstats->HP <= 0 && parent)
@@ -1406,7 +1434,7 @@ void actMagicMissile(Entity* my) //TODO: Verify this function.
14061434
}
14071435

14081436

1409-
damage *= Entity::getDamageTableMultiplier(hit.entity, *hitstats, DAMAGE_TABLE_MAGIC);
1437+
damage *= damageMultiplier;
14101438
damage /= (1 + (int)resistance);
14111439
hit.entity->modHP(-damage);
14121440
for (i = 0; i < damage; i += 2) //Spawn a gib for every two points of damage.
@@ -1425,12 +1453,12 @@ void actMagicMissile(Entity* my) //TODO: Verify this function.
14251453
if ( !strcmp(hitstats->name, "") )
14261454
{
14271455
updateEnemyBar(parent, hit.entity, getMonsterLocalizedName(hitstats->type).c_str(), hitstats->HP, hitstats->MAXHP,
1428-
false, DamageGib::DMG_TODO);
1456+
false, dmgGib);
14291457
}
14301458
else
14311459
{
14321460
updateEnemyBar(parent, hit.entity, hitstats->name, hitstats->HP, hitstats->MAXHP,
1433-
false, DamageGib::DMG_TODO);
1461+
false, dmgGib);
14341462
}
14351463

14361464
if ( hitstats->HP <= 0 && parent)
@@ -1621,7 +1649,7 @@ void actMagicMissile(Entity* my) //TODO: Verify this function.
16211649
}
16221650
damage = damage - local_rng.rand() % ((damage / 8) + 1);
16231651
}
1624-
damage *= Entity::getDamageTableMultiplier(hit.entity, *hitstats, DAMAGE_TABLE_MAGIC);
1652+
damage *= damageMultiplier;
16251653
if ( parent )
16261654
{
16271655
Stat* casterStats = parent->getStats();
@@ -1672,12 +1700,12 @@ void actMagicMissile(Entity* my) //TODO: Verify this function.
16721700
if ( !strcmp(hitstats->name, "") )
16731701
{
16741702
updateEnemyBar(parent, hit.entity, getMonsterLocalizedName(hitstats->type).c_str(), hitstats->HP, hitstats->MAXHP,
1675-
false, DamageGib::DMG_TODO);
1703+
false, dmgGib);
16761704
}
16771705
else
16781706
{
16791707
updateEnemyBar(parent, hit.entity, hitstats->name, hitstats->HP, hitstats->MAXHP,
1680-
false, DamageGib::DMG_TODO);
1708+
false, dmgGib);
16811709
}
16821710
if ( oldHP > 0 && hitstats->HP <= 0 )
16831711
{
@@ -1940,7 +1968,7 @@ void actMagicMissile(Entity* my) //TODO: Verify this function.
19401968
}
19411969
//damage += ((element->mana - element->base_mana) / static_cast<double>(element->overload_multiplier)) * element->damage;
19421970
int oldHP = hitstats->HP;
1943-
damage *= Entity::getDamageTableMultiplier(hit.entity, *hitstats, DAMAGE_TABLE_MAGIC);
1971+
damage *= damageMultiplier;
19441972
damage /= (1 + (int)resistance);
19451973
hit.entity->modHP(-damage);
19461974
Entity* gib = spawnGib(hit.entity);
@@ -1956,12 +1984,12 @@ void actMagicMissile(Entity* my) //TODO: Verify this function.
19561984
if ( !strcmp(hitstats->name, "") )
19571985
{
19581986
updateEnemyBar(parent, hit.entity, getMonsterLocalizedName(hitstats->type).c_str(), hitstats->HP, hitstats->MAXHP,
1959-
false, DamageGib::DMG_TODO);
1987+
false, dmgGib);
19601988
}
19611989
else
19621990
{
19631991
updateEnemyBar(parent, hit.entity, hitstats->name, hitstats->HP, hitstats->MAXHP,
1964-
false, DamageGib::DMG_TODO);
1992+
false, dmgGib);
19651993
}
19661994
if ( parent )
19671995
{
@@ -2166,7 +2194,7 @@ void actMagicMissile(Entity* my) //TODO: Verify this function.
21662194
}
21672195
//damage += ((element->mana - element->base_mana) / static_cast<double>(element->overload_multiplier)) * element->damage;
21682196
int oldHP = hitstats->HP;
2169-
damage *= Entity::getDamageTableMultiplier(hit.entity, *hitstats, DAMAGE_TABLE_MAGIC);
2197+
damage *= damageMultiplier;
21702198
damage /= (1 + (int)resistance);
21712199
hit.entity->modHP(-damage);
21722200

@@ -2180,12 +2208,12 @@ void actMagicMissile(Entity* my) //TODO: Verify this function.
21802208
if ( !strcmp(hitstats->name, "") )
21812209
{
21822210
updateEnemyBar(parent, hit.entity, getMonsterLocalizedName(hitstats->type).c_str(), hitstats->HP, hitstats->MAXHP,
2183-
false, DamageGib::DMG_TODO);
2211+
false, dmgGib);
21842212
}
21852213
else
21862214
{
21872215
updateEnemyBar(parent, hit.entity, hitstats->name, hitstats->HP, hitstats->MAXHP,
2188-
false, DamageGib::DMG_TODO);
2216+
false, dmgGib);
21892217
}
21902218
if ( oldHP > 0 && hitstats->HP <= 0 && parent)
21912219
{
@@ -2721,7 +2749,7 @@ void actMagicMissile(Entity* my) //TODO: Verify this function.
27212749
int damage = element->damage;
27222750
damage += (spellbookDamageBonus * damage);
27232751
//damage += ((element->mana - element->base_mana) / static_cast<double>(element->overload_multiplier)) * element->damage;
2724-
damage *= Entity::getDamageTableMultiplier(hit.entity, *hitstats, DAMAGE_TABLE_MAGIC);
2752+
damage *= damageMultiplier;
27252753
Stat* casterStats = nullptr;
27262754
if ( parent )
27272755
{
@@ -2795,12 +2823,12 @@ void actMagicMissile(Entity* my) //TODO: Verify this function.
27952823
if ( !strcmp(hitstats->name, "") )
27962824
{
27972825
updateEnemyBar(parent, hit.entity, getMonsterLocalizedName(hitstats->type).c_str(), hitstats->HP, hitstats->MAXHP,
2798-
false, DamageGib::DMG_TODO);
2826+
false, dmgGib);
27992827
}
28002828
else
28012829
{
28022830
updateEnemyBar(parent, hit.entity, hitstats->name, hitstats->HP, hitstats->MAXHP,
2803-
false, DamageGib::DMG_TODO);
2831+
false, dmgGib);
28042832
}
28052833

28062834
if ( hitstats->HP <= 0 && parent )

0 commit comments

Comments
 (0)