0.5 * dev^( 1 + local autonomy * 0.75)
Populate Engagement with Ships until Engagement Width in this order: Heavy, Galley, Light Transports Ignore Disengaged Ships. For Each Ship in Engagement If previous target is about to die set previous target to null If has no previous target Pick a random target with best score from the enemies engaged ships Base chance to be picked of 10 Add random integer of 0 to 5 If of same ship type, increase chance to be picked +5 If morale is zero or below, reduce chance to be picked /10 If damage is less than 50%, increase chance to be picked *2 BaseDamage = 0.025 + 0.025 * (2 + Dice + Combat Modifiers) Damage = BaseDamage * ShipCannons / TargetHull If Galley type multiply damage with 2 WeaponEffect = 0.05 * ( ArtilleryFire - TargetArtilleryFire ) Damage *= 1 + WeaponEffect Damage *= ShipCombatAbility + LeaderBonus MoraleDamage = Damage * CountryNavalMorale / 3 * ShipStrength * 0.25 Apply Splash Morale Damage to 3 random targets, 10% of MoraleDamage If ship Morale is 0 or below, multiply Damage with 10 Damage *= 0.03 Damage /= DurabilityModifier Damage *= ShipStrength [Snip] For Each Ship in Engagement If Ship Morale is below 0.5 Throw a 100 sided dice, if it is less than ship Disengagement Chance Disengage
POR_ideas = { start = { range = 0.25 trade_efficiency = 0.15 } bonus = { global_tariffs = 0.20 } trigger = { tag = POR } free = yes #will be added at load. legacy_of_the_navigator = { sunk_ship_morale_hit_recieved = -0.33 disengagement_chance = 0.05 } afonsine_ordinances = { global_trade_goods_size_modifier = 0.1 } case_de_india = { global_trade_power = 0.1 } land_before_faith = { global_colonial_growth = 15 } the_bandeirantes = { merchants = 1 } royal_absolutism = { build_cost = -0.15 yearly_absolutism = 0.5 } por_royal_military_academy = { defensiveness = 0.1 artillery_power = 0.1 } } afonsine_ordinances:0 "Afonsine Ordinance" afonsine_ordinances_desc:0 "The growth in aristocratic privilege is a threat to the authority of the crown. We are going to prevent that growth by making the administration of justice being done via crown appointees rather than the nobility. This will ensure that the crown's interests are put first." legacy_of_the_navigator:0 "Legacy of the Navigator" legacy_of_the_navigator_desc:1 "Henry the Navigator was the third son of John I of Portugal. Knowing he would never be King, he spent his life promoting exploration and sea craft, funding expeditions, gathering knowledge about naval matters, and encouraging advances in naval technology. This legacy is still with us today and continues to inspire our sailors and admirals to push themselves to greater deeds." case_de_india:0 "Feitorias" case_de_india_desc:0 "Let us send forth our feitors to all corners of the eastern continents and establish our country as the dominant trading force in the Indian Ocean. By creating a network of strong fortified trading posts along the coasts of Africa and India we can dominate the local trade without spending great resources." the_bandeirantes:0 "Encourage the Bandeirantes" the_bandeirantes_desc:0 "Some members of expeditions into the interior for slave raiding would stumble across finds of gold and other precious metals and stones. These rumors would encourage hardy souls to journey to our colonies." royal_absolutism:0 "Royal Absolutism" royal_absolutism_desc:0 "For too long Royal Power has been limited by the foolish interventions by the nobility, whose narrow local interests are threatening the greater good of the realm. We will dissolve the Cortes and rule without their interference." por_royal_military_academy:0 "Royal Academy of Fortification, Artillery and Drawing" por_royal_military_academy_desc:0 "Our artillery corps and fortifications have long been the key to defending our land, making our small country a tougher nut to crack for enemy armies. We shall establish a military academy - the Academia Real de Fortificação, Artilharia e Desenho - to train our officers in these fields, so that they in turn may fashion our forts and our artillery corps into the finest in the world!"