-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[WIP] Rebalancing of the control laptop, give robots a chance #30892
Closed
matthemsteger
wants to merge
2
commits into
CleverRaven:master
from
matthemsteger:features/interesting-control-laptop
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -155,6 +155,7 @@ const efftype_id effect_infected( "infected" ); | |||||
const efftype_id effect_jetinjector( "jetinjector" ); | ||||||
const efftype_id effect_meth( "meth" ); | ||||||
const efftype_id effect_music( "music" ); | ||||||
const efftype_id effect_not_receiving( "not_receiving" ); | ||||||
const efftype_id effect_paincysts( "paincysts" ); | ||||||
const efftype_id effect_panacea( "panacea" ); | ||||||
const efftype_id effect_pet( "pet" ); | ||||||
|
@@ -5751,6 +5752,8 @@ bool iuse::robotcontrol_can_target( player *p, const monster &m ) | |||||
return !m.is_dead() | ||||||
&& m.type->in_species( ROBOT ) | ||||||
&& m.friendly == 0 | ||||||
&& !m.has_flag(MF_HACK_IMMUNE) | ||||||
&& !m.has_effect( effect_not_receiving, num_bp ) | ||||||
&& rl_dist( p->pos(), m.pos() ) <= 10; | ||||||
} | ||||||
|
||||||
|
@@ -5766,16 +5769,21 @@ int iuse::robotcontrol( player *p, item *it, bool, const tripoint & ) | |||||
return 0; | ||||||
} | ||||||
|
||||||
int choice = uilist( _( "Welcome to hackPRO!:" ), { | ||||||
_( "Prepare IFF protocol override" ), | ||||||
_( "Set friendly robots to passive mode" ), | ||||||
_( "Set friendly robots to combat mode" ) | ||||||
} ); | ||||||
/** @EFFECT_INT speeds up hacking preperation */ | ||||||
/** @EFFECT_COMPUTER speeds up hacking preperation */ | ||||||
int deliver_move_cost = std::max( 100, 1000 - p->int_cur * 10 - p->get_skill_level( skill_computer ) * 10 ); | ||||||
const int mode_move_cost = 100; | ||||||
|
||||||
int choice = uilist(_("Welcome to hackPRO!:"), | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
{{ uilist_entry( 0, true, -1, _("Scan for broadcasting robots"), _("Scan for nearby robots that are accepting connections"), std::to_string(deliver_move_cost))}, | ||||||
{ uilist_entry( 1, true, -1, _("Set friendly robots to passive mode"), _("Robots will stop pursuing all targets for attack"), std::to_string(mode_move_cost))}, | ||||||
{ uilist_entry( 2, true, -1, _("Set friendly robots to combat mode"), _("Robots will pursue all targets for attack"), std::to_string(mode_move_cost))} | ||||||
}); | ||||||
switch( choice ) { | ||||||
case 0: { // attempt to make a robot friendly | ||||||
uilist pick_robot; | ||||||
pick_robot.text = _( "Choose an endpoint to hack." ); | ||||||
// Build a list of all unfriendly robots in range. | ||||||
// Build a list of all unfriendly robots in range, that are accepting connections | ||||||
std::vector< std::shared_ptr< monster> > mons; // TODO: change into vector<Creature*> | ||||||
std::vector< tripoint > locations; | ||||||
int entry_num = 0; | ||||||
|
@@ -5808,10 +5816,7 @@ int iuse::robotcontrol( player *p, item *it, bool, const tripoint & ) | |||||
std::shared_ptr< monster > z = mons[mondex]; | ||||||
p->add_msg_if_player( _( "You start reprogramming the %s into an ally." ), z->name() ); | ||||||
|
||||||
/** @EFFECT_INT speeds up hacking preperation */ | ||||||
/** @EFFECT_COMPUTER speeds up hacking preperation */ | ||||||
int move_cost = std::max( 100, 1000 - p->int_cur * 10 - p->get_skill_level( skill_computer ) * 10 ); | ||||||
player_activity act( activity_id( "ACT_ROBOT_CONTROL" ), move_cost ); | ||||||
player_activity act( activity_id( "ACT_ROBOT_CONTROL" ), deliver_move_cost ); | ||||||
act.monsters.emplace_back( z ); | ||||||
|
||||||
p->assign_activity( act ); | ||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
While I'm not against this change, I think the real issue here is this formula.
This formula puts too much emphasis on the difficulty value. Here's a table of the min and max for hacking of a security bot and tank drone by intelligence and computer skill.
Values are (min,max) - even though they aren't that way for low intelligence.
Calculated from
Security Bot - difficulty 14
Tank Drone - difficulty 126
To me, it seems as though this formula cares too much about difficulty. It's probably like the electrohack formula #29898 - old and not making a huge amount of sense.
If the goal of this PR is to address the way that the control laptop trivializes things, I think the root of the problem is here.
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 agree about the formula, it is likely the root of the problems.
I see now that I had not dug into
difficulty
so my odds were off a bit (I assumed it was just from the json, but its a calculation itself).