-
Notifications
You must be signed in to change notification settings - Fork 6
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
Fix Issue #45 "Reapers don't require tech lab anymore" #46
Conversation
@@ -209,7 +209,6 @@ sc2::UnitTypeData Observer::GetUnitTypeData(sc2::UNIT_TYPEID id_) const { | |||
break; | |||
|
|||
case sc2::UNIT_TYPEID::TERRAN_MARAUDER: | |||
case sc2::UNIT_TYPEID::TERRAN_REAPER: | |||
data.tech_requirement = sc2::UNIT_TYPEID::TERRAN_BARRACKSTECHLAB; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, this patch is not enough.
You should move the reaper ability from here
suvorov-bot/src/blueprints/Blueprint.cpp
Line 106 in cf3bdf5
case sc2::ABILITY_ID::TRAIN_REAPER: |
to here:
suvorov-bot/src/blueprints/Blueprint.cpp
Line 101 in cf3bdf5
case sc2::ABILITY_ID::TRAIN_MARINE: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Currently we have a lot of intermediate changes in the history. Please squash the commits and I'll merge the request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Squashed and force-pushed. :)
src/blueprints/Building.cpp
Outdated
point.x = base.x + sc2::GetRandomScalar() * 15.0f; | ||
point.y = base.y + sc2::GetRandomScalar() * 15.0f; | ||
|
||
offset.x = sc2::GetRandomScalar() * range; //build in range of StartLoc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest to try the approach used in CommandCenter.
The mineral line in the starting location is enclosed into a rectangle, if a building point is in the rectangle, different value is used. However, such approach requires careful detection of mineral lines which could be done in
Line 19 in 1fb4e7e
struct Expansion { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also we can use the placement grid abstraction from the api and mark the related tiles as occupied.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will look at that. I've reverted that commit, so the Reaper fix can be accepted while I work on this.
Thank you! LGTM. |
Removes REAPER from BARRACKSTECHLAB case in API.cpp's tech_requirement workaround.
Tested building Reapers without a BarrackTechLab and it works now.