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

Pirates can move from land to land #398

Open
stm2 opened this issue Nov 15, 2015 · 1 comment
Open

Pirates can move from land to land #398

stm2 opened this issue Nov 15, 2015 · 1 comment
Labels

Comments

@stm2
Copy link
Member

stm2 commented Nov 15, 2015

Piraten fahren ggbf. von einer Landregion zu einer benachbarten Landregion ohne zu prüfen, ob es einen Weg über Ozean dorthin gibt. Entweder sollte piracy prüfen, ob das geht (Pfad der Länge 2, Küsten beachten, Reichweite beachten) oder Piraterie von Land zu Land sollte einfach verboten sein.

function test_ship_piracy()
set_rule("rules.ship.drifting", "1")
set_rule("rules.ship.damage_drift", "0.02")
local r = region.create(0,0, "plain")
local r2 = region.create(1,0, "plain")
-- local r3 = region.create(0,1, "ocean")
local f = faction.create("[email protected]", "human", "de")
local f2 = faction.create("[email protected]", "human", "de")

local s1 = ship.create(r, "cutter")
local u1 = unit.create(f, r, 1)
u1.ship = s1
u1:set_skill("sailing", 10)
u1:clear_orders()
u1:add_order("PIRATERIE")

local s2 = ship.create(r2, "cutter")
local u2 = unit.create(f2, r2, 1)
u2.ship = s2
u2:set_skill("sailing", 10)

update_owners()
process_orders()
assert_not_equal(u2.region, u1.region)

-- write_reports()
end

@CTD1
Copy link
Contributor

CTD1 commented Nov 15, 2015

Piraterie von einem Landfeld aus ist OK, aber es dürfte als Ziel ausschließlich Ozeanfelder angesteuert werden. An Land kannman das andere Schiff vom Schiff aus eh nicht angreifen. Dabei müsste dann noch auf die Küste geschaut werden.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants