Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starcraft 2 Wings of Liberty AP Implementation #528

Merged
merged 42 commits into from
May 18, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
3f421a8
Initial File For Fork
Apr 3, 2022
c335926
Initial World Files For Fork
Apr 3, 2022
92ecc55
Added nested asyncio to requirements
Apr 3, 2022
6367cac
Removed Unneeded Comment
Apr 3, 2022
6eed872
Updated Choice Upgrade Generation
Apr 3, 2022
8886a19
Fixed Location Typo
Apr 3, 2022
a262cc6
Added Six Requirement
Apr 3, 2022
88b765f
Baseline UI for SC2 client
Apr 3, 2022
e460694
Available command
Apr 6, 2022
568ec31
Missing Command and more Level Codes
Apr 7, 2022
85770d7
Added new forked sc2 libraries
Apr 7, 2022
31798d0
Filled out maps table and added lost connection message
Apr 9, 2022
bd3d992
Turned lost connection message into unable to establish connection
Apr 9, 2022
1a332b1
Added Requirements for Rescuable Locations In Moebius Factor
Apr 11, 2022
2cffa39
Added two more bits for objective detection
Apr 11, 2022
f734f33
Updated Locations
May 5, 2022
83aa74e
Fixed duplicate IDs
May 6, 2022
c742c6d
Implemented ALL IN choice
May 6, 2022
74623fe
Added StarcraftClient
May 6, 2022
4ff130e
Added Starcraft2Client
May 6, 2022
2e5e086
Remove Unneeded SNI code
May 6, 2022
d0ac28e
Added sc2 library to zip_exclude
May 6, 2022
be55700
Fixed Typo in Starcraft 2 Client
May 6, 2022
2186dd0
Beta Test Changes
May 15, 2022
610280d
Prevent non available missions from being played
May 16, 2022
b17e002
Fixed grammar issue in description
May 16, 2022
bb9faa6
3.1 Merge
May 16, 2022
546cabf
Merge branch 'ArchipelagoMW:main' into Starcraft2
TheCondor07 May 18, 2022
afe5835
Merge pull request #2 from TheCondor07/Starcraft2
TheCondor07 May 18, 2022
0d51c74
Starcraft 2 Wings of Liberty Implementation
TheCondor07 May 18, 2022
4a319bb
Descript and setup guide setup
May 18, 2022
6b65722
Fixed error in Starcraft 2 logic
May 18, 2022
6aac1ff
Updated armory research to show unit it is for
May 18, 2022
1aa6f49
Added Starcraft 2 tutorial declaration
May 18, 2022
4562b66
Renamed Starcraft 2 for the Webhost to be more readable
May 18, 2022
8d716e9
Adjusted player settings link in SC2 for the name change
May 18, 2022
73984af
Adjusted the client to use the new Starcraft 2 game name.
May 18, 2022
3c8339c
Changed apsc2 version so that it no longer requires importlib-metadata
May 18, 2022
d524471
Remove unneeded code
TheCondor07 May 18, 2022
592ea41
Remove comments
TheCondor07 May 18, 2022
f9ae899
Remove commented out code
TheCondor07 May 18, 2022
23d6341
remove more commented out code
Berserker66 May 18, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updated Choice Upgrade Generation
  • Loading branch information
Matthew Bessette committed Apr 3, 2022
commit 6eed87283a6efa4af1e6fb1494a73bece6778359
16 changes: 5 additions & 11 deletions worlds/sc2wol/Items.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def __init__(self, name, advancement: bool = False, code: int = None, player: in


def get_full_item_list():
return item_table | upgrade_bonus | bunker_upgrade
return item_table


SC2WOL_ITEM_ID_OFFSET = 1000
Expand Down Expand Up @@ -109,6 +109,8 @@ def get_full_item_list():
"Dusk Wings": ItemData(506 + SC2WOL_ITEM_ID_OFFSET, "Mercenary", 6),
"Jackson's Revenge": ItemData(507 + SC2WOL_ITEM_ID_OFFSET, "Mercenary", 7),

"Ultra-Capacitors": ItemData(600 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 0),
"Vanadium Plating": ItemData(601 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 1),
"Orbital Depots": ItemData(602 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 2),
"Micro-Filtering": ItemData(603 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 3),
"Automated Refinery": ItemData(604 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 4),
Expand All @@ -117,6 +119,8 @@ def get_full_item_list():
"Science Vessel": ItemData(607 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 7),
"Tech Reactor": ItemData(608 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 8),
"Orbital Strike": ItemData(609 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 9),
"Shrike Turret": ItemData(610 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 10),
"Fortified Bunker": ItemData(611 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 11),
"Planetary Fortress": ItemData(612 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 12),
"Perdition Turret": ItemData(613 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 13),
"Predator": ItemData(614 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 14),
Expand All @@ -140,16 +144,6 @@ def get_full_item_list():
"+5 Starting Vespene": ItemData(501+SC2WOL_ITEM_ID_OFFSET, "Vespene", 5, quantity=0)
}

upgrade_bonus = {
"Ultra-Capacitors": ItemData(600 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 0),
"Vanadium Plating": ItemData(601 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 1)
}

bunker_upgrade = {
"Shrike Turret": ItemData(610 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 10),
"Fortified Bunker": ItemData(611 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 11)
}

basic_unit: typing.Tuple[str, ...] = (
'Marine',
'Marauder',
Expand Down
35 changes: 12 additions & 23 deletions worlds/sc2wol/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from typing import List, Set, Tuple
from BaseClasses import Item, MultiWorld, Location
from .Items import StarcraftWoLItem, item_table, filler_items, item_name_groups, upgrade_bonus, get_full_item_list, \
from .Items import StarcraftWoLItem, item_table, filler_items, item_name_groups, get_full_item_list, \
basic_unit
from .Locations import get_locations
from .Regions import create_regions
Expand Down Expand Up @@ -59,26 +59,6 @@ def generate_basic(self):

self.world.itempool += pool


def blah(self):
itempool: typing.List[StarcraftWoLItem] = []

for item in item_table:
itempool += self._create_items(item)

if get_option_value(self.world, self.player, "upgrade_bonus") == 0:
itempool += self._create_items("Ultra-Capacitors")
else:
itempool += self._create_items("Vanadium Plating")

if get_option_value(self.world, self.player, "bunker_upgrade") == 0:
itempool += self._create_items("Shrike Turret")
else:
itempool += self._create_items("Fortified Bunker")

self.world.itempool += itempool


def set_rules(self):
setup_events(self.world, self.player, self.locked_locations, self.location_cache)

Expand Down Expand Up @@ -109,9 +89,18 @@ def setup_events(world: MultiWorld, player: int, locked_locations: typing.List[s
def get_excluded_items(self: SC2WoLWorld, world: MultiWorld, player: int) -> Set[str]:
excluded_items: Set[str] = set()

if get_option_value(world, player, "upgrade_bonus") == 1:
excluded_items.add("Ultra-Capacitors")
else:
excluded_items.add("Vanadium Plating")

if get_option_value(world, player, "bunker_upgrade") == 1:
excluded_items.add("Shrike Turret")
else:
excluded_items.add("Fortified Bunker")

for item in world.precollected_items[player]:
if item.name not in self.item_name_groups['UseItem']:
excluded_items.add(item.name)
excluded_items.add(item.name)

return excluded_items

Expand Down