feat: enemizer damage rework
This commit is contained in:
@@ -152,12 +152,14 @@ These are now independent of retro mode and have three options: None, Random, an
|
|||||||
* Vitreous on Ice: Arrows and Bombs or a Beam Sword
|
* Vitreous on Ice: Arrows and Bombs or a Beam Sword
|
||||||
* Trinexx on Ice: Boots always required for dodging. Damage options:
|
* Trinexx on Ice: Boots always required for dodging. Damage options:
|
||||||
* Gold sword
|
* Gold sword
|
||||||
* Tempered with magic extension
|
* Tempered sword with magic extension
|
||||||
* Hammer or Master Sword with 3 magic extensions (Rod spam for elemental heads, non ideal for last phase)
|
* Hammer or Master sword with 3 magic extensions (Rod spam for elemental heads, non-ideal weapon for last phase)
|
||||||
* Trinexx on Ice forbidden in doors seeds until we can model some health requirements. Low health Trinexx still isn't realistically feasible (bascially playing OHKO)
|
* Trinexx on Ice forbidden in doors seeds until we can model some health requirements. Low health Trinexx still isn't realistically feasible (bascially playing OHKO)
|
||||||
* Logic: Added silver arrows as Arrghus damage option when item functionality is not set to hard or expert
|
* Logic: Added silver arrows as Arrghus damage option when item functionality is not set to hard or expert
|
||||||
* Logic: Byrna not in logic for laser bridge when item functionality is set to hard or expert
|
* Logic: Byrna not in logic for laser bridge when item functionality is set to hard or expert
|
||||||
* Enemzier Damage: Thief damage to player is not randomized
|
* Enemizer Damage Rework:
|
||||||
|
* Shuffled: Actually shuffles the damage groups in the table instead of picking random numbers and reducing for mails from there. Enemies will still be assigned to a damage group randomly.
|
||||||
|
* There will always be at least one group which does no damage. The thief will always be in that group. Ganon always has his own group.
|
||||||
* Glitched modes: Aga 1 should be vulnerable in rain state for glitched modes
|
* Glitched modes: Aga 1 should be vulnerable in rain state for glitched modes
|
||||||
* Generation: Trinexx and Lanmolas room allowed as lobbies in intensity 3 (works with enemizer now)
|
* Generation: Trinexx and Lanmolas room allowed as lobbies in intensity 3 (works with enemizer now)
|
||||||
* Enemy AI: Terrorpin AI code removed. May help with unusual enemy behavior?
|
* Enemy AI: Terrorpin AI code removed. May help with unusual enemy behavior?
|
||||||
|
|||||||
@@ -422,7 +422,7 @@ skip_sprites = {
|
|||||||
EnemySprite.HelmasaurKing, EnemySprite.Vitreous, EnemySprite.TrinexxRockHead, EnemySprite.TrinexxFireHead,
|
EnemySprite.HelmasaurKing, EnemySprite.Vitreous, EnemySprite.TrinexxRockHead, EnemySprite.TrinexxFireHead,
|
||||||
EnemySprite.TrinexxIceHead, EnemySprite.Blind, EnemySprite.Kholdstare, EnemySprite.KholdstareShell,
|
EnemySprite.TrinexxIceHead, EnemySprite.Blind, EnemySprite.Kholdstare, EnemySprite.KholdstareShell,
|
||||||
EnemySprite.FallingIce, EnemySprite.Arrghi, EnemySprite.Agahnim, EnemySprite.Ganon,
|
EnemySprite.FallingIce, EnemySprite.Arrghi, EnemySprite.Agahnim, EnemySprite.Ganon,
|
||||||
EnemySprite.PositionTarget, EnemySprite.Boulders, EnemySprite.Thief
|
EnemySprite.PositionTarget, EnemySprite.Boulders
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -474,21 +474,39 @@ def randomize_enemies(world, player):
|
|||||||
stat.damage = stats[EnemySprite.GreenEyegoreMimic].damage # these share data
|
stat.damage = stats[EnemySprite.GreenEyegoreMimic].damage # these share data
|
||||||
elif sprite == EnemySprite.RedMimic:
|
elif sprite == EnemySprite.RedMimic:
|
||||||
stat.damage = stats[EnemySprite.RedEyegoreMimic].damage # these share data
|
stat.damage = stats[EnemySprite.RedEyegoreMimic].damage # these share data
|
||||||
|
elif sprite == EnemySprite.Thief: # always group 0 for 0 damage
|
||||||
|
stat.damage = 0
|
||||||
elif sprite not in skip_sprites:
|
elif sprite not in skip_sprites:
|
||||||
if isinstance(stat.damage, tuple):
|
if isinstance(stat.damage, tuple):
|
||||||
stat.damage = random.randint(0, 8), random.randint(0, 8)
|
stat.damage = random.randint(0, 8), random.randint(0, 8)
|
||||||
else:
|
else:
|
||||||
stat.damage = random.randint(0, 8)
|
stat.damage = random.randint(0, 8)
|
||||||
# randomize bump table
|
# randomize bump table
|
||||||
|
original_table = [
|
||||||
|
(0x02, 0x01, 0x01),
|
||||||
|
(0x04, 0x04, 0x04),
|
||||||
|
(0x00, 0x00, 0x00),
|
||||||
|
(0x08, 0x04, 0x02),
|
||||||
|
(0x08, 0x08, 0x08),
|
||||||
|
(0x10, 0x08, 0x04),
|
||||||
|
(0x20, 0x10, 0x08),
|
||||||
|
(0x20, 0x18, 0x10),
|
||||||
|
(0x18, 0x10, 0x08),
|
||||||
|
(0x40, 0x30, 0x18)]
|
||||||
for i in range(0, 10):
|
for i in range(0, 10):
|
||||||
max_damage = 64 if i == 9 or world.enemy_damage[player] == 'random' else 32
|
if i == 0: # group 0 will always be 0 for thieves
|
||||||
green_mail = random.randint(0, max_damage)
|
green_mail, blue_mail, red_mail = 0, 0, 0
|
||||||
if world.enemy_damage[player] == 'random':
|
del original_table[2]
|
||||||
blue_mail = random.randint(0, max_damage)
|
|
||||||
red_mail = random.randint(0, max_damage)
|
|
||||||
else:
|
else:
|
||||||
blue_mail = (green_mail * 3) // 4
|
if world.enemy_damage[player] == 'random':
|
||||||
red_mail = (green_mail * 3) // 8
|
green_mail = random.randint(0, 64)
|
||||||
|
if world.enemy_damage[player] == 'random':
|
||||||
|
blue_mail = random.randint(0, 64)
|
||||||
|
red_mail = random.randint(0, 64)
|
||||||
|
else:
|
||||||
|
idx = random.randint(0, len(original_table)-1)
|
||||||
|
green_mail, blue_mail, red_mail = original_table[idx]
|
||||||
|
del original_table[idx]
|
||||||
world.data_tables[player].enemy_damage[i] = [green_mail, blue_mail, red_mail]
|
world.data_tables[player].enemy_damage[i] = [green_mail, blue_mail, red_mail]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user