Skip to content

Commit

Permalink
Implement Research Center, fix static maps (General Mike and starting…
Browse files Browse the repository at this point in the history
… map)

Fixes for General Mike, Initial map, Research Center functionality, Buying and using spells from Research Center
Included also is a fix for fast_forward command as it wasn't running on some more timestamps in the player save
Some new assets were included with this commit as well
  • Loading branch information
Nerroth committed Dec 21, 2022
1 parent 0dcb5c5 commit 0dcb1c8
Showing 40 changed files with 4,685 additions and 4 deletions.
Binary file added assets/characters_2/good_1_m_premium.swf
Binary file not shown.
Binary file added assets/fx/p.avatarlance.swf
Binary file not shown.
Binary file added assets/fx/p.bigmissile.swf
Binary file not shown.
Binary file added assets/images/collectibles3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumbs/BOTON1_NINJA.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumbs/BOTON2_NINJA.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumbs/BOTON3_NINJA.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumbs/BOTON4_NINJA.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumbs/btn_1075_laser.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumbs/btn_1075_misil.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumbs/btn_1105_callDraggy.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumbs/btn_1105_metallicBalls.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumbs/btn_1105_metallicBomb.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumbs/btn_1105_metallicTornado.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumbs/btn_1152_circle_shooting.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumbs/btn_1152_deadly_turn.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumbs/btn_1152_huge_laser.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumbs/btn_1152_missile_launch.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumbs/btn_1152_summon_drone_2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumbs/btn_1152_whirlwind.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumbs/btn_1169_big_shot.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumbs/btn_1169_spinning_attack.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumbs/btn_celestial_mega_mech.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumbs/btn_laser_punisher.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumbs/btn_misil_punisher.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumbs/btn_misile_storm.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumbs/btn_optimus.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumbs/btn_saw_attack.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumbs/btn_special_rambo_grenade.jpg
Binary file added assets/thumbs/btn_special_rambo_slash.jpg
Binary file added assets/thumbs/btn_special_terminator_bazooka.jpg
Binary file added assets/thumbs/metal_dragon_Boton01.jpg
Binary file added assets/thumbs/metal_dragon_Boton02.jpg
Binary file added assets/thumbs/metal_dragon_Boton03.jpg
Binary file added assets/thumbs/metal_dragon_Boton04.jpg
29 changes: 29 additions & 0 deletions command.py
Original file line number Diff line number Diff line change
@@ -643,6 +643,33 @@ def do_command(USERID, map_id, cmd, args, resources_changed):
map["resourceAlliesMarket"] = resource
print("Set Allies Market resource")

elif cmd == "buy_mana_new":
print("Bought mana") # Nothing needs to be done here :)

elif cmd == "buy_magic":
magic_id = args[0]

privateState = save["privateState"]
magics = privateState["magics"]
if str(magic_id) in magics:
magics[str(magic_id)] += min(50, magics[str(magic_id)] + 1)
else:
magics[str(magic_id)] = 0

print("Bought magic spell")

elif cmd == "use_magic":
magic_id = args[0]

privateState = save["privateState"]
magics = privateState["magics"]
if str(magic_id) in magics:
magics[str(magic_id)] = min(50, magics[str(magic_id)] + 1)
else:
magics[str(magic_id)] = 0

print("Used magic spell")

elif cmd == "fast_forward":
seconds = args[0]

@@ -657,6 +684,8 @@ def do_command(USERID, map_id, cmd, args, resources_changed):
privateState["timestampLastAllianceBonus"] = max(0, privateState["timestampLastAllianceBonus"] - seconds)
# privateState["timeStampDartsReset"] = max(0, privateState["timeStampDartsReset"] - seconds) # don't process weekly things
privateState["timeStampDartsNewFree"] = max(0, privateState["timeStampDartsNewFree"] - seconds)
privateState["tsAttacksReset"] = max(0, privateState["tsAttacksReset"] - seconds)
privateState["tsSpyingsReset"] = max(0, privateState["tsSpyingsReset"] - seconds)

# research timers
research_timers = privateState["timeStampDoResearch"]
4 changes: 4 additions & 0 deletions version.py
Original file line number Diff line number Diff line change
@@ -20,5 +20,9 @@ def migrate_loaded_save(save: dict):
_changed = True
privateState["deadHeroes"] = {}
print(" [!] Applied hospital fix")
if type(privateState["magics"]) != dict:
_changed = True
privateState["magics"] = {}
print(" [!] Applied magics fix")

return _changed
4 changes: 2 additions & 2 deletions villages/General_Mike.json → villages/General_Mike_30.json
Original file line number Diff line number Diff line change
@@ -4457,12 +4457,12 @@
"attacksPack": 0,
"spyings": [],
"spyingsPack": 0,
"deadHeroes": [],
"deadHeroes": {},
"timeStampEndPremium": 0,
"unlockedSkins": null,
"unlockedQuestIndex": 0,
"questsRank": {},
"magics": null,
"magics": {},
"timeStampDartsReset": 0,
"timeStampDartsNewFree": 0,
"dartsBalloonsShot": [],
Loading

0 comments on commit 0dcb1c8

Please sign in to comment.