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

Remove port search reduction per evil good and incorporate in a base chance reduction to 4% #976

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 1 addition & 2 deletions src/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,7 @@
/*
* Port searchs
*/
const PORT_SEARCH_BASE_CHANCE = 15;
const PORT_SEARCH_REDUCTION_PER_EVIL_GOOD = 4;
const PORT_SEARCH_BASE_CHANCE = 3;
const PORT_SEARCH_REDUCTION_FOR_EVIL_SHIP = 4;

/*
Expand Down
9 changes: 0 additions & 9 deletions src/engine/Default/shop_goods.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,6 @@
// test if we are searched, but only if we hadn't a previous trade here

$baseChance = PORT_SEARCH_BASE_CHANCE;
if ($port->hasGood(GOODS_SLAVES)) {
$baseChance -= PORT_SEARCH_REDUCTION_PER_EVIL_GOOD;
}
if ($port->hasGood(GOODS_WEAPONS)) {
$baseChance -= PORT_SEARCH_REDUCTION_PER_EVIL_GOOD;
}
if ($port->hasGood(GOODS_NARCOTICS)) {
$baseChance -= PORT_SEARCH_REDUCTION_PER_EVIL_GOOD;
}

if ($ship->isUnderground()) {
$baseChance -= PORT_SEARCH_REDUCTION_FOR_EVIL_SHIP;
Expand Down