Skip to content

Commit

Permalink
Granularity: Add Trireme
Browse files Browse the repository at this point in the history
- Add tech Seafaring
- Add unit Trireme
- Make Boats able to sail tiles next to coast only
- Rename unit class Sea as ShallowSea
- Add terrain Deep Ocean, that ShallowSea units are not able to enter

See RM #270

Signed-off-by: Marko Lindqvist <[email protected]>
  • Loading branch information
cazfi committed Mar 1, 2024
1 parent 20ddd63 commit d19ae09
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 7 deletions.
9 changes: 9 additions & 0 deletions data/granularity/techs.ruleset
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,15 @@ graphic = "a.rope"
graphic_alt = "-"
;helptext =

[advance_seafaring]
name = _("Seafaring")
req1 = "Carving"
req2 = "Rope"
flags = ""
graphic = "a.seafaring"
graphic_alt = "-"
;helptext =

[advance_siege_engines]
name = _("Siege Engines")
req1 = "Rope"
Expand Down
52 changes: 50 additions & 2 deletions data/granularity/terrain.ruleset
Original file line number Diff line number Diff line change
Expand Up @@ -397,14 +397,62 @@ warmer_wetter_result = "no"
warmer_drier_result = "no"
cooler_wetter_result = "no"
cooler_drier_result = "no"
native_to = "Sea"
native_to = "ShallowSea"
;flags =
property_ocean_depth = 10
color.r = 50
color.g = 50
color.b = 230
helptext = _("\
This is only possible oceanic terrain.\
Shallow Ocean usually exist only next to land.\
")

[terrain_deep_ocean]
name = _("Deep Ocean")
graphic = "deep_ocean"
graphic_alt = "floor"
graphic_alt2 = "coast"
identifier = ":"
class = "Oceanic"
movement_cost = 5
defense_bonus = 0
food = 100
shield = 100
trade = 0
resources = "Generic Resource"
road_food_incr_pct = 0
road_shield_incr_pct = 0
road_trade_incr_pct = 100
base_time = 0
road_time = 0
cultivate_result = "no"
cultivate_time = 0
plant_result = "no"
plant_time = 0
irrigation_food_incr = 100
irrigation_time = 5
mining_shield_incr = 0
mining_time = 0
transform_result = "no"
transform_time = 0
placing_time = 1
pillage_time = 1
extra_settings =
{ "extra", "removal_time"
}
animal = "None"
warmer_wetter_result = "no"
warmer_drier_result = "no"
cooler_wetter_result = "no"
cooler_drier_result = "no"
;native_to = ""
;flags =
property_ocean_depth = 85
color.r = 0
color.g = 33
color.b = 129
helptext = _("\
Deep Ocean usually exist further away from the land.\
")

; /* <-- avoid gettext warnings
Expand Down
48 changes: 43 additions & 5 deletions data/granularity/units.ruleset
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ min_speed = 5
hp_loss_pct = 0
flags = "TerrainSpeed", "NonNatBombardTgt", "CanOccupyCity"

[unitclass_sea]
name = _("Sea")
[unitclass_shallow_sea]
name = _("ShallowSea")
min_speed = 5
hp_loss_pct = 0
flags = "TerrainSpeed"
Expand Down Expand Up @@ -785,12 +785,12 @@ and plants.\

[unit_boat]
name = _("Boats")
class = "Sea"
class = "ShallowSea"
reqs =
{ "type", "name", "range"
"Tech", "Carving", "Player"
}
obsolete_by = "None"
obsolete_by = "Trireme"
graphic = "u.boats"
graphic_alt = "u.trireme"
sound_move = "m_boats"
Expand All @@ -813,10 +813,48 @@ uk_food = 0
uk_gold = 0
cargo = "Land"
tp_defense = "Alight"
flags = "CoastStrict"
roles = "Ferryboat", "BarbarianBoat"
helptext = _("\
Boats carved from logs. \
They cannot sail off the coast.\
")

[unit_trireme]
name = _("Trireme")
class = "ShallowSea"
reqs =
{ "type", "name", "range"
"Tech", "Seafaring", "Player"
}
obsolete_by = "None"
graphic = "u.trireme"
graphic_alt = "-"
sound_move = "m_trireme"
sound_move_alt = "m_generic"
sound_fight = "f_trireme"
sound_fight_alt = "f_generic"
build_cost = 2800
pop_cost = 0
attack = 20
defense = 20
hitpoints = 10
firepower = 1
move_rate = 150
vision_radius_sq = 2
transport_cap = 2
fuel = 0
uk_happy = 0
uk_shield = 0
uk_food = 0
uk_gold = 0
cargo = "Land"
tp_defense = "Alight"
flags = ""
roles = "Ferryboat", "BarbarianBoat"
helptext = _("\
Boats carved from logs.\
First boat type able to leave the coastline, but still restricted \
to sail on shallow oceans only.\
")

[unit_emissary]
Expand Down

0 comments on commit d19ae09

Please sign in to comment.