17#define CALLTYPE __vectorcall
87 pack_float.v.low = data[0];
88 pack_float.v.high = data[1];
101 pack_float.v.low = data[0];
102 pack_float.v.high = data[1];
108#define TRIGGER_FUNCTION(function_name) std::string CALLTYPE function_name(uint16_t const* tval, sys::state& ws)
114 std::string result =
"false >r ";
115 while(sub_units_start < tval + source_size) {
117 result +=
"r> or >r ";
128 std::string result =
"true >r ";
129 while(sub_units_start < tval + source_size) {
131 result +=
"r> and >r ";
140 return apply_disjuctively(tval, ws);
142 return apply_conjuctively(tval, ws);
153 return apply_subtriggers(tval, ws);
158 return "dup >r false >r make-ap-it "
159 "while more? r@ not and "
164 + apply_subtriggers(tval, ws) +
" r> swap "
174 return "dup >r true >r make-ap-it "
175 "while more? r@ and "
180 + apply_subtriggers(tval, ws) +
" r> swap "
193 return "dup >r false >r make-sp-it "
194 "while more? r@ not and "
198 "swap r> swap >r >r "
200 "while more? r@ not and "
203 "dup state_membership @ r> r> .parent@ swap >r swap >r = not "
206 + apply_subtriggers(tval, ws) +
" r> swap "
213 "drop r> r> swap >r "
221 return "dup >r true >r make-sp-it "
222 "while more? r@ and "
226 "swap r> swap >r >r "
228 "while more? r@ and "
231 "dup state_membership @ r> r> .parent@ swap >r swap >r = not "
234 + apply_subtriggers(tval, ws) +
" r> swap "
241 "drop r> r> swap >r "
252 return "dup >r false >r make-an-it "
253 "while more? r@ not and "
257 + apply_subtriggers(tval, ws) +
" r> swap "
264 return "dup >r true >r make-an-it "
265 "while more? r@ and "
269 + apply_subtriggers(tval, ws) +
" r> swap "
279 return "dup >r " +
pop_to_owner() +
"false >r make-an-it "
280 "while more? r@ not and "
284 + apply_subtriggers(tval, ws) +
" r> swap "
291 return "dup >r " +
pop_to_owner() +
"true >r make-an-it "
292 "while more? r@ and "
296 + apply_subtriggers(tval, ws) +
" r> swap "
306 return "false >r dup >r "
307 "nation_adjacency-connected_nations dup size "
308 "while 1 - dup 0 >= r> swap r@ not and swap >r "
310 "2dup index @ dup is_attacker @ >r "
311 "war @ war_participant-war dup size"
312 "while 1 - dup 0 >= r> swap r> swap r@ not and swap >r swap >r "
314 "2dup index @ dup is_attacker @ r@ <> "
317 "swap >r swap >r swap >r swap >r "
318 + apply_subtriggers(tval, ws) +
" r> swap r> swap r> swap r> swap"
319 "r> swap r> swap r> drop >r >r >r "
329 return "true >r dup >r "
330 "nation_adjacency-connected_nations dup size "
331 "while 1 - dup 0 >= r> swap r@ and swap >r "
333 "2dup index @ dup is_attacker @ >r "
334 "war @ war_participant-war dup size"
335 "while 1 - dup 0 >= r> swap r> swap r@ and swap >r swap >r "
337 "2dup index @ dup is_attacker @ r@ <> "
340 "swap >r swap >r swap >r swap >r "
341 + apply_subtriggers(tval, ws) +
" r> swap r> swap r> swap r> swap"
342 "r> swap r> swap r> drop >r >r >r "
356 "nation_adjacency-connected_nations dup size "
357 "while 1 - dup 0 >= r> swap r@ not and swap >r "
359 "2dup index @ dup is_attacker @ >r "
360 "war @ war_participant-war dup size"
361 "while 1 - dup 0 >= r> swap r> swap r@ not and swap >r swap >r "
363 "2dup index @ dup is_attacker @ r@ <> "
366 "swap >r swap >r swap >r swap >r "
367 + apply_subtriggers(tval, ws) +
" r> swap r> swap r> swap r> swap"
368 "r> swap r> swap r> drop >r >r >r "
375 "drop drop r> drop r> r> swap "
379 "nation_adjacency-connected_nations dup size "
380 "while 1 - dup 0 >= r> swap r@ and swap >r "
382 "2dup index @ dup is_attacker @ >r "
383 "war @ war_participant-war dup size"
384 "while 1 - dup 0 >= r> swap r> swap r@ and swap >r swap >r "
386 "2dup index @ dup is_attacker @ r@ <> "
389 "swap >r swap >r swap >r swap >r "
390 + apply_subtriggers(tval, ws) +
" r> swap r> swap r> swap r> swap"
391 "r> swap r> swap r> drop >r >r >r "
398 "drop drop r> drop r> r> swap "
404 return ">r false >r nation-size @ "
405 "while 1 - dup 0 >= r@ not and "
409 + apply_subtriggers(tval, ws) +
" r> swap "
416 return ">r true >r nation-size @ "
417 "while 1 - dup 0 >= r@ and "
421 + apply_subtriggers(tval, ws) +
" r> swap "
431 return ">r false >r make-gp-it "
432 "while more? r@ not and "
435 "dup is_great_power @ "
438 + apply_subtriggers(tval, ws) +
" r> swap "
448 return ">r true >r make-gp-it "
449 "while more? r@ and "
452 "dup is_great_power @ "
455 + apply_subtriggers(tval, ws) +
" r> swap "
468 return "dup >r false >r make-sp-it "
469 "while more? r@ not and "
474 + apply_subtriggers(tval, ws) +
" r> swap "
484 return "dup >r true >r make-sp-it "
485 "while more? r@ and "
490 + apply_subtriggers(tval, ws) +
" r> swap "
503 return "dup >r false >r make-n-it "
504 "while more? r@ not and "
508 + apply_subtriggers(tval, ws) +
" r> swap "
515 return "dup >r true >r make-n-it "
516 "while more? r@ and "
520 + apply_subtriggers(tval, ws) +
" r> swap "
530 return "dup >r false >r make-pc-it "
531 "while more? r@ not and "
536 + apply_subtriggers(tval, ws) +
" r> swap "
546 return "dup >r true >r make-pc-it "
547 "while more? r@ and "
552 + apply_subtriggers(tval, ws) +
" r> swap "
565 return "dup >r false >r make-nc-it "
566 "while more? r@ not and "
570 + apply_subtriggers(tval, ws) +
" r> swap "
577 return "dup >r true >r make-nc-it "
578 "while more? r@ and "
582 + apply_subtriggers(tval, ws) +
" r> swap "
593 return "dup >r false >r make-ns-it "
594 "while more? r@ not and "
598 + apply_subtriggers(tval, ws) +
" r> swap "
605 return "dup >r true >r make-ns-it "
606 "while more? r@ and "
610 + apply_subtriggers(tval, ws) +
" r> swap "
620 return "dup >r false >r make-nv-it "
621 "while more? r@ not and "
627 + apply_subtriggers(tval, ws) +
" r> swap "
637 return "dup >r true >r make-nv-it "
638 "while more? r@ and "
644 + apply_subtriggers(tval, ws) +
" r> swap "
657 return "dup >r false >r make-ngp-it "
658 "while more? r@ not and "
663 + apply_subtriggers(tval, ws) +
" r> swap "
673 return "dup >r true >r make-ngp-it "
674 "while more? r@ and "
679 + apply_subtriggers(tval, ws) +
" r> swap "
692 return "dup >r false >r make-pp-it "
693 "while more? r@ not and "
697 + apply_subtriggers(tval, ws) +
" r> swap "
704 return "dup >r true >r make-pp-it "
705 "while more? r@ and "
709 + apply_subtriggers(tval, ws) +
" r> swap "
719 return "dup >r false >r make-sp-it "
720 "while more? r@ not and "
724 "swap r> swap >r >r "
726 "while more? r@ not and "
730 + apply_subtriggers(tval, ws) +
" r> swap "
734 "drop r> r> swap >r "
742 return "dup >r true >r make-sp-it "
743 "while more? r@ and "
747 "swap r> swap >r >r "
749 "while more? r@ and "
753 + apply_subtriggers(tval, ws) +
" r> swap "
757 "drop r> r> swap >r "
768 return "dup >r false >r make-n-it "
769 "while more? r@ not and "
773 "swap r> swap >r >r "
775 "while more? r@ not and "
779 + apply_subtriggers(tval, ws) +
" r> swap "
783 "drop r> r> swap >r "
791 return "dup >r true >r make-n-it "
792 "while more? r@ and "
796 "swap r> swap >r >r "
798 "while more? r@ and "
802 + apply_subtriggers(tval, ws) +
" r> swap "
806 "drop r> r> swap >r "
817 return ">r false >r " + std::to_string(
trigger::payload(*(tval + 2)).state_id.index()) +
" >state_definition_id make-asp-it "
818 "while more? r@ not and "
822 + apply_subtriggers(tval, ws) +
" r> swap "
829 return ">r true >r " + std::to_string(
trigger::payload(*(tval + 2)).state_id.index()) +
" >state_definition_id make-asp-it "
830 "while more? r@ and "
834 + apply_subtriggers(tval, ws) +
" r> swap "
844 return ">r false >r " + std::to_string(
trigger::payload(*(tval + 2)).reg_id.index()) +
" >region_id make-arp-it "
845 "while more? r@ not and "
849 + apply_subtriggers(tval, ws) +
" r> swap "
856 return ">r true >r " + std::to_string(
trigger::payload(*(tval + 2)).reg_id.index()) +
" >region_id make-arp-it "
857 "while more? r@ and "
861 + apply_subtriggers(tval, ws) +
" r> swap "
874 result += apply_subtriggers(tval, ws);
875 result +=
"swap drop r> swap ";
881 result += apply_subtriggers(tval, ws);
882 result +=
"swap drop r> swap ";
888 result += apply_subtriggers(tval, ws);
889 result +=
"swap drop r> swap ";
896 result += apply_subtriggers(tval, ws);
897 result +=
"swap drop r> swap ";
903 result += apply_subtriggers(tval, ws);
904 result +=
"swap drop r> swap ";
910 result += apply_subtriggers(tval, ws);
911 result +=
"swap drop r> swap ";
916 result +=
"dup >r capital @ ";
917 result += apply_subtriggers(tval, ws);
918 result +=
"swap drop r> swap ";
924 result += apply_subtriggers(tval, ws);
925 result +=
"swap drop r> swap ";
931 result += apply_subtriggers(tval, ws);
932 result +=
"swap drop r> swap ";
938 result += apply_subtriggers(tval, ws);
939 result +=
"swap drop r> swap ";
944 result +=
">r >r dup r> swap ";
945 result += apply_subtriggers(tval, ws);
946 result +=
"swap drop r> swap ";
952 result +=
"dup >r port_to @ ";
953 result += apply_subtriggers(tval, ws);
954 result +=
"swap drop r> swap ";
959 return "culture_group_membership-member group @ "
960 "cultural_union_of-culture_group identity @ identity_holder-identity nation @ ";
970 result += apply_subtriggers(tval, ws);
971 result +=
"swap drop r> swap ";
975 return "overlord-subject ruler @ ";
980 result += apply_subtriggers(tval, ws);
981 result +=
"swap drop r> swap ";
986 result +=
"dup >r in_sphere_of @ ";
987 result += apply_subtriggers(tval, ws);
988 result +=
"swap drop r> swap ";
993 result +=
">r >r dup defection_target @ identity_holder-identity nation @ r> swap ";
994 result += apply_subtriggers(tval, ws);
995 result +=
"swap drop r> swap ";
1000 result +=
"dup >r flashpoint_tag @ identity_holder-identity nation @ ";
1001 result += apply_subtriggers(tval, ws);
1002 result +=
"swap drop r> swap ";
1007 result +=
">r crisis-state @ ";
1008 result += apply_subtriggers(tval, ws);
1009 result +=
"swap drop r> swap ";
1014 result +=
"dup >r state_membership @ ";
1015 result += apply_subtriggers(tval, ws);
1016 result +=
"swap drop r> swap ";
1022 result += apply_subtriggers(tval, ws);
1023 result +=
"swap drop r> swap ";
1030 result +=
">r " + std::to_string(tag.index()) +
" >national_identity_id identity_holder-identity nation @ ";
1031 result += apply_subtriggers(tval, ws);
1032 result +=
"swap drop r> swap ";
1039 result +=
">r " + std::to_string(wprov.index()) +
" >province_id ";
1040 result += apply_subtriggers(tval, ws);
1041 result +=
"swap drop r> swap ";
1045 return apply_subtriggers(tval, ws);
1050 result += apply_subtriggers(tval, ws);
1051 result +=
"swap drop r> swap ";
1057 result += apply_subtriggers(tval, ws);
1058 result +=
"swap drop r> swap ";
1067 return "start-date @ current-date @ >i64 -1 >i64 + + current-year " + std::to_string(int32_t(tval[1])) +
compare_values(tval[0]);
1070 return "start-date @ current-date @ >i64 -1 >i64 + + current-month " + std::to_string(int32_t(tval[1])) +
compare_values(tval[0]);
1073 return "dup is_coast @ ";
1077 return "dup get_rank @ >i32 " + std::to_string(int32_t(tval[1])) +
" swap " +
compare_values(tval[0]);
1105 return "dup >index state-ptr @ empty-a-province " +
truth_inversion(tval[0]);
1119 return "dup >index state-ptr @ empty-a-state " +
truth_inversion(tval[0]);
1144 return "dup abstract_state_membership-province state @ "
1145 + std::to_string(
trigger::payload(tval[1]).prov_id.index()) +
" >province_id abstract_state_membership-province state @ = " +
truth_inversion(tval[0]);
1148 return "dup definition @ "
1149 + std::to_string(
trigger::payload(tval[1]).prov_id.index()) +
" >province_id abstract_state_membership-province state @ = " +
truth_inversion(tval[0]);
1178 return "dup poptype @ has_unemployment @ not >r "
1179 "dup uemployment @ >f32 " + std::to_string(1.0f /
float(std::numeric_limits<uint8_t>::max())) +
" * 1.0 swap - 0.0 r> select "
1192 return "dup poptype @ >index " + std::to_string(ws.culture_definitions.slaves.index()) +
" " +
compare_values_eq(tval[0]);
1195 return "dup overlord-subject ruler @ valid? not " +
truth_inversion(tval[0]);
1210 return "dup dup primary_culture @ " +
demo_culture_key(ws) +
"demographics @ >r "
1244 return "dup primary_culture @ >index " + std::to_string(
trigger::payload(tval[1]).cul_id.index()) +
" = >r "
1248 return ">r >r dup primary_culture @ >index r> swap r> swap >r dup culture @ >index r> " +
compare_values_eq(tval[0]);
1251 return ">r >r dup primary_culture @ >index r> swap r> swap >r dup dominant_culture @ >index r> " +
compare_values_eq(tval[0]);
1254 return ">r >r dup primary_culture @ >index r> swap r> swap >r dup dominant_culture @ >index r> " +
compare_values_eq(tval[0]);
1257 return ">r >r dup primary_culture @ r> swap r> swap >r dup primary_culture @ r@ = >r "
1258 "dup r> r> swap >r accepted_cultures @ r> or " +
truth_inversion(tval[0]);
1261 return "dup culture @ swap >r >r dup primary_culture @ r@ = >r "
1262 "dup r> r> swap >r accepted_cultures @ r> or " +
truth_inversion(tval[0]) +
"r> swap ";
1265 return "dup culture @ swap >r swap >r >r dup primary_culture @ r@ = >r "
1266 "dup r> r> swap >r accepted_cultures @ r> or " +
truth_inversion(tval[0]) +
"r> swap r> swap ";
1269 return "dup culture @ swap >r >r dup " +
state_to_owner() +
"dup primary_culture @ r@ = >r "
1270 "r> r> swap >r accepted_cultures @ r> or " +
truth_inversion(tval[0]) +
"r> swap ";
1273 return "dup culture @ swap >r >r dup " +
pop_to_owner() +
"dup primary_culture @ r@ = >r "
1274 "r> r> swap >r accepted_cultures @ r> or " +
truth_inversion(tval[0]) +
"r> swap ";
1277 return "dup culture @ swap >r >r dup " +
province_to_owner() +
"dup primary_culture @ r@ = >r "
1278 "r> r> swap >r accepted_cultures @ r> or " +
truth_inversion(tval[0]) +
"r> swap ";
1281 return "dup primary_culture @ culture_group_membership-member group @ >index " + std::to_string(
trigger::payload(tval[1]).culgrp_id.index()) +
" " +
compare_values_eq(tval[0]);
1284 return "dup culture @ culture_group_membership-member group @ >index " + std::to_string(
trigger::payload(tval[1]).culgrp_id.index()) +
" " +
compare_values_eq(tval[0]);
1287 return "dup dominant_culture @ culture_group_membership-member group @ >index " + std::to_string(
trigger::payload(tval[1]).culgrp_id.index()) +
" " +
compare_values_eq(tval[0]);
1290 return "dup dominant_culture @ culture_group_membership-member group @ >index " + std::to_string(
trigger::payload(tval[1]).culgrp_id.index()) +
" " +
compare_values_eq(tval[0]);
1293 return "dup primary_culture @ culture_group_membership-member group @ >r >r >r dup primary_culture @ culture_group_membership-member group @ r> swap r> swap r> = " +
truth_inversion(tval[0]);
1296 return "dup culture @ culture_group_membership-member group @ >r >r >r dup primary_culture @ culture_group_membership-member group @ r> swap r> swap r> = " +
truth_inversion(tval[0]);
1299 return "dup primary_culture @ culture_group_membership-member group @ >r >r dup primary_culture @ culture_group_membership-member group @ r> swap r> = " +
truth_inversion(tval[0]);
1302 return "dup culture @ culture_group_membership-member group @ >r >r dup primary_culture @ culture_group_membership-member group @ r> swap r> = " +
truth_inversion(tval[0]);
1305 return "dup primary_culture @ culture_group_membership-member group @ >r >r >r dup primary_culture @ culture_group_membership-member group @ r> swap r> swap r> = " +
truth_inversion(tval[0]);
1308 return "dup culture @ culture_group_membership-member group @ >r >r >r dup primary_culture @ culture_group_membership-member group @ r> swap r> swap r> = " +
truth_inversion(tval[0]);
1311 return "dup primary_culture @ culture_group_membership-member group @ >r >r dup " +
province_to_owner() +
"primary_culture @ culture_group_membership-member group @ r> swap r> = " +
truth_inversion(tval[0]);
1314 return "dup culture @ culture_group_membership-member group @ >r >r dup " +
province_to_owner() +
"primary_culture @ culture_group_membership-member group @ r> swap r> = " +
truth_inversion(tval[0]);
1317 return "dup primary_culture @ culture_group_membership-member group @ >r >r dup " +
state_to_owner() +
"primary_culture @ culture_group_membership-member group @ r> swap r> = " +
truth_inversion(tval[0]);
1320 return "dup culture @ culture_group_membership-member group @ >r >r dup " +
state_to_owner() +
"primary_culture @ culture_group_membership-member group @ r> swap r> = " +
truth_inversion(tval[0]);
1323 return "dup primary_culture @ culture_group_membership-member group @ >r >r dup " +
pop_to_owner() +
"primary_culture @ culture_group_membership-member group @ r> swap r> = " +
truth_inversion(tval[0]);
1326 return "dup culture @ culture_group_membership-member group @ >r >r dup " +
pop_to_owner() +
"primary_culture @ culture_group_membership-member group @ r> swap r> = " +
truth_inversion(tval[0]);
1332 return ">r >r dup religion @ >index r> swap r> swap >r dup religion @ >index r> " +
compare_values_eq(tval[0]);
1335 return ">r >r dup religion @ >index r> swap r> swap >r dup religion @ >index r> " +
compare_values_eq(tval[0]);
1338 return ">r dup religion @ >index r> swap >r dup religion @ >index r> " +
compare_values_eq(tval[0]);
1360 return "dup rank @ >i32 " + std::to_string(int32_t(ws.defines.colonial_rank)) +
" <= " +
truth_inversion(tval[0]);
1363 return "dup " +
pop_to_owner() +
"rank @ >i32 " + std::to_string(int32_t(ws.defines.colonial_rank)) +
" <= " +
truth_inversion(tval[0]);
1366 return "false >r dup rebellion_within-ruler dup size "
1367 "while 1 - dup 0 >= loop "
1368 "2dup index @ rebels type @ >index " + std::to_string(
trigger::payload(tval[1]).reb_id.index()) +
" = r> or >r "
1379 return "dup >index state-ptr @ unowned-core " +
truth_inversion(tval[0]);
1382 return "dup identity_holder-nation @ identity >index " + std::to_string(
trigger::payload(tval[1]).tag_id.index()) +
" >national_identity_id identity_holder-identity nation @ >index state-ptr @ core-in-nation " +
truth_inversion(tval[0]);
1385 return "dup identity_holder-nation @ identity >index >r >r dup >index r> swap r> swap state-ptr @ core-in-nation " +
truth_inversion(tval[0]);
1388 return "dup identity_holder-nation @ identity >index >r >r >r dup >index r> swap r> swap r> swap state-ptr @ core-in-nation " +
truth_inversion(tval[0]);
1392 return "dup identity_holder-nation @ identity cultural_union_of-identity @ valid? " +
truth_inversion(tval[0]);
1395 return "dup culture @ culture_group_membership-member group @ >r >r "
1396 "dup identity_holder-nation @ identity cultural_union_of-identity @ culture_group r> swap r> = " +
truth_inversion(tval[0]);
1399 return "dup culture @ culture_group_membership-member group @ >r >r "
1400 "dup " +
pop_to_owner() +
"identity_holder-nation @ identity cultural_union_of-identity @ culture_group r> swap r> = " +
truth_inversion(tval[0]);
1403 return "dup identity_holder-nation @ identity cultural_union_of-identity @ culture_group >r >r "
1404 "dup identity_holder-nation @ identity cultural_union_of-identity @ culture_group r> swap r> = " +
truth_inversion(tval[0]);
1407 return "dup identity_holder-nation @ identity cultural_union_of-identity @ culture_group >r >r "
1408 "dup " +
pop_to_owner() +
"identity_holder-nation @ identity cultural_union_of-identity @ culture_group r> swap r> = " +
truth_inversion(tval[0]);
1411 return "dup identity_holder-nation @ identity cultural_union_of-identity @ culture_group >r >r "
1412 "dup " +
state_to_owner() +
"identity_holder-nation @ identity cultural_union_of-identity @ culture_group r> swap r> = " +
truth_inversion(tval[0]);
1415 return "dup identity_holder-nation @ identity cultural_union_of-identity @ culture_group >r >r "
1419 return "dup identity_holder-nation @ identity cultural_union_of-identity @ culture_group >r >r >r "
1420 "dup primary_culture @ culture_group_membership-member group @ r> swap r> swap r> = " +
truth_inversion(tval[0]);
1423 return "dup primary_culture @ culture_group_membership-member group @ cultural_union_of-culture_group identity @ >index "
1425 "dup identity_holder-nation @ identity cultural_union_of-identity @ culture_group "
1426 + std::to_string(
trigger::payload(tval[1]).tag_id.index()) +
" >national_identity_id cultural_union_of-identity @ culture_group = "
1430 return ">r dup culture @ culture_group_membership-member group @ cultural_union_of-culture_group identity @ >index "
1434 return ">r dup " +
state_to_owner() +
"primary_culture @ culture_group_membership-member group @ cultural_union_of-culture_group identity @ >index "
1436 "dup " +
state_to_owner() +
"identity_holder-nation @ identity cultural_union_of-identity @ culture_group "
1437 + std::to_string(
trigger::payload(tval[1]).tag_id.index()) +
" >national_identity_id cultural_union_of-identity @ culture_group = "
1441 return ">r dup " +
state_to_owner() +
"primary_culture @ culture_group_membership-member group @ cultural_union_of-culture_group identity @ >index "
1443 "dup " +
state_to_owner() +
"identity_holder-nation @ identity cultural_union_of-identity @ culture_group "
1444 + std::to_string(
trigger::payload(tval[1]).tag_id.index()) +
" >national_identity_id cultural_union_of-identity @ culture_group = "
1448 return ">r dup primary_culture @ culture_group_membership-member group @ cultural_union_of-culture_group identity @ >index "
1450 "dup identity_holder-nation @ identity cultural_union_of-identity @ culture_group "
1451 + std::to_string(
trigger::payload(tval[1]).tag_id.index()) +
" >national_identity_id cultural_union_of-identity @ culture_group = "
1509 return "dup >index >r >r >r dup " +
nation_to_tag() +
">index r> swap r> swap r> state-ptr @ core-in-province " +
truth_inversion(tval[0]);
1512 return "dup >index >r >r >r dup defection_target @ >index r> swap r> swap r> state-ptr @ core-in-province " +
truth_inversion(tval[0]);
1515 return "dup >index >r >r >r dup " +
nation_to_tag() +
">index r> swap r> swap r> state-ptr @ core-in-state " +
truth_inversion(tval[0]);
1539 return "dup rebel_controlled_count @ >i32 " + std::to_string(tval[1]) +
" " +
compare_values(tval[0]);
1542 return "dup central_province_count @ >f32 >r dup central_rebel_controlled @ >f32 r@ / 0.0 r> 0.0 <= select "
1546 return "dup owned_province_count @ >i32 " + std::to_string(tval[1]) +
" " +
compare_values(tval[0]);
1549 return ">r >r dup owned_province_count @ r> swap r> swap >r dup owned_province_count @ r> " +
compare_values(tval[0]);
1552 return ">r dup owned_province_count @ r> swap >r dup owned_province_count @ r> " +
compare_values(tval[0]);
1561 return ">r dup " +
pop_to_owner() +
"owned_province_count @ r> swap >r dup owned_province_count @ r> " +
compare_values(tval[0]);
1564 return "dup central_ports @ >i32 " + std::to_string(tval[1]) +
" " +
compare_values(tval[0]);
1567 return "dup allies_count @ >i32 " + std::to_string(tval[1]) +
" " +
compare_values(tval[0]);
1570 return "dup vassals_count @ >i32 " + std::to_string(tval[1]) +
" " +
compare_values(tval[0]);
1609 return "dup owned_province_count @ >i32 0 <> " +
truth_inversion(tval[0]);
1639 return ">r dup capital @ continent @ r> swap >r dup capital @ continent @ r> = " +
truth_inversion(tval[0]);
1642 return ">r dup capital @ continent @ r> swap >r dup capital @ continent @ r> = " +
truth_inversion(tval[0]);
1645 return ">r dup capital @ continent @ r> swap >r dup continent @ r> = " +
truth_inversion(tval[0]);
1651 return ">r >r dup capital @ continent @ r> swap r> swap >r dup capital @ continent @ r> = " +
truth_inversion(tval[0]);
1654 return ">r >r dup capital @ continent @ r> swap r> swap >r dup capital @ continent @ r> = " +
truth_inversion(tval[0]);
1657 return ">r >r dup capital @ continent @ r> swap r> swap >r dup continent @ r> = " +
truth_inversion(tval[0]);
1666 return ">r >r dup r> swap r> swap >r dup >index r> >index state-ptr @ has-cb-against " +
truth_inversion(tval[0]);
1669 return ">r >dup r> swap >r dup >index r> >index state-ptr @ has-cb-against " +
truth_inversion(tval[0]);
1684 return ">r >r dup >index r> swap r> swap >r dup >index r> state-ptr @ has-access-with " +
truth_inversion(tval[0]);
1687 return ">r dup >index r> swap >r dup >index r> state-ptr @ has-access-with " +
truth_inversion(tval[0]);
1702 return ">r >r dup prestige @ r> swap r> swap >r dup prestige @ r> " +
compare_values(tval[0]);
1705 return ">r dup prestige @ r> swap >r dup prestige @ r> " +
compare_values(tval[0]);
1729 return "dup >index state-ptr @ has-any-factory " +
truth_inversion(tval[0]);
1735 return "dup state_membership @ >index " + std::to_string(
trigger::payload(tval[1]).fac_id.index()) +
" state-ptr @ has-factory " +
truth_inversion(tval[0]);
1738 return "dup state_membership @ >index state-ptr @ has-any-factory " +
truth_inversion(tval[0]);
1759 return "dup abstract_state_membership-province state @ >index " + std::to_string(
trigger::payload(tval[1]).state_id.index()) +
" " +
compare_values_eq(tval[0]);
1793 return ">r >r dup r> swap r> swap >r dup r> = " +
truth_inversion(tval[0]);
1805 return ">r dup active_regiments @ r> swap >r dup active_regiments @ r> " +
compare_values(tval[0]);
1817 return ">r >r dup active_regiments @ r> swap r> swap >r dup active_regiments @ r> " +
compare_values(tval[0]);
1826 return ">r dup >index r> swap >r dup >index r> state-ptr @ nation-a " +
truth_inversion(tval[0]);
1829 return ">r >r dup >index r> swap r> swap >r dup >index r> state-ptr @ nation-a " +
truth_inversion(tval[0]);
1838 return ">r >r dup >index r> swap r> swap >r dup >index r> swap state-ptr @ units-in-state " +
truth_inversion(tval[0]);
1841 return ">r dup >index r> swap >r dup >index r> swap state-ptr @ units-in-state " +
truth_inversion(tval[0]);
1850 return ">r dup " +
pop_to_owner() +
">index r> swap >r dup >index r> swap state-ptr @ units-in-state " +
truth_inversion(tval[0]);
1856 return "dup >index state-ptr @ count-p-units " + std::to_string(int32_t(tval[1])) +
" " +
compare_values(tval[0]);
1863 return "dup >index >r >r >r dup >index r> swap r> swap r> state-ptr @ units-in-province " +
truth_inversion(tval[0]);
1866 return "dup >index >r >r dup >index r> swap r> state-ptr @ units-in-province " +
truth_inversion(tval[0]);
1881 return ">r >r dup >index r> swap r> swap >r dup >index r> state-ptr @ at-war? " +
truth_inversion(tval[0]);
1884 return ">r dup >index r> swap >r dup >index r> state-ptr @ at-war? " +
truth_inversion(tval[0]);
1896 return "dup land_battle_location-location size 0 <> " +
truth_inversion(tval[0]);
1899 return "dup >index state-ptr @ general-in-province? " +
truth_inversion(tval[0]);
1908 return "dup active_regiments @ >i32 " + std::to_string(int32_t(tval[1])) +
" " +
compare_values(tval[0]);
1920 return "dup overlord-subject ruler @ valid? " +
truth_inversion(tval[0]);
1941 return "dup upolitical_reform_desire @ >f32 " + std::to_string(1.0f /
float(std::numeric_limits<uint8_t>::max())) +
" * " + std::to_string(
read_float_from_payload(tval + 1)) +
" " +
compare_values(tval[0]);
1947 return "dup usocial_reform_desire @ >f32 " + std::to_string(1.0f /
float(std::numeric_limits<uint8_t>::max())) +
" * " + std::to_string(
read_float_from_payload(tval + 1)) +
" " +
compare_values(tval[0]);
1950 return "dup >index state-ptr @ count-ships " + std::to_string(int32_t(tval[1])) +
" " +
compare_values(tval[0]);
1959 return "dup central_province_count @ >f32 >r dup central_crime_count @ >f32 r@ / 0.0 r> 0.0 <= select " + std::to_string(
read_float_from_payload(tval + 1)) +
" " +
compare_values(tval[0]);
1980 return ">r >r dup r> swap r> swap >r dup primary_culture @ r> primary_culture @ = " +
truth_inversion(tval[0]);
1986 return ">r dup r> swap >r dup primary_culture @ r> primary_culture @ = " +
truth_inversion(tval[0]);
1989 return ">r dup culture @ r> swap >r dup primary_culture @ r> = " +
truth_inversion(tval[0]);
1998 return ">r dup r> swap >r dup dominant_culture @ r> primary_culture @ = " +
truth_inversion(tval[0]);
2010 return ">r dup r> swap >r dup dominant_culture @ r> primary_culture @ = " +
truth_inversion(tval[0]);
2022 return ">r dup r> swap >r dup culture @ r> primary_culture @ = " +
truth_inversion(tval[0]);
2035 return ">r dup primary_culture @ r> swap >r dup r> accepted_cultures @ " +
truth_inversion(tval[0]);
2038 return ">r dup culture @ r> swap >r dup r> accepted_cultures @ " +
truth_inversion(tval[0]);
2071 return ">r dup r> swap >r dup culture r> swap accepted_cultures @ " +
truth_inversion(tval[0]);
2096 return "dup >index state-ptr @ coastal-s? @ " +
truth_inversion(tval[0]);
2102 return ">r >r dup r> swap r> swap >r dup in_sphere_of @ r> = " +
truth_inversion(tval[0]);
2105 return ">r dup r> swap >r dup in_sphere_of @ r> = " +
truth_inversion(tval[0]);
2164 return "dup dup >r active_regiments @ >f32 r> recruitable_regiments @ >f32 dup >r / 1.0 0.0 r> >= select " + std::to_string(
read_float_from_payload(tval + 1)) +
" " +
compare_values(tval[0]);
2173 return ">r dup culture @ >index r> swap >r dup >index r> state-ptr @ has-culture-core? " +
truth_inversion(tval[0]);
2176 return "dup nationalism @ " + std::to_string(
float(tval[1])) +
" " +
compare_values(tval[0]);
2179 return "dup dup >r " +
province_to_owner() +
"capital @ dup continent @ r@ continent @ = not r> swap >r >r "
2180 "connected_region_id @ r> connected_region_id @ <> r> and " +
truth_inversion(tval[0]);
2184 "connected_region_id @ r> connected_region_id @ <> r> and " +
truth_inversion(tval[0]);
2187 return "dup capital @ dup >r " +
province_to_owner() +
"capital @ dup continent @ r@ continent @ = not r> swap >r >r "
2188 "connected_region_id @ r> connected_region_id @ <> r> and " +
truth_inversion(tval[0]);
2191 return "dup province_rebel_control-province rebel_faction @ valid? " +
truth_inversion(tval[0]);
2215 return ">r >r dup r> swap r> swap >r dup province_rebel_control-province rebel_faction @ r> = " +
truth_inversion(tval[0]);
2218 return std::to_string(tval[1] - 1) +
" state-ptr @ canal-enabled? " +
truth_inversion(tval[0]);
2221 return "dup dup >r state_membership @ capital @ r> = " +
truth_inversion(tval[0]);
2230 return ">r >r dup r> swap r> swap >r dup >index r> >index state-ptr @ truce-with? " +
truth_inversion(tval[0]);
2233 return ">r dup r> swap >r dup >index r> >index state-ptr @ truce-with? " +
truth_inversion(tval[0]);
2269 return "dup >index state-ptr @ empty-a-province " +
truth_inversion(tval[0]);
2280 return "dup >index >r false 0"
2282 ">r dup not r> swap >r "
2283 "dup national_identity-size < r> and "
2285 "dup r@ swap state-ptr @ can-release? "
2286 ">r swap drop r> swap "
2302 return ">r >r dup r> swap r> swap >r dup overlord-subject ruler @ = " +
truth_inversion(tval[0]);
2305 return ">r dup r> swap >r dup overlord-subject ruler @ = " +
truth_inversion(tval[0]);
2336 return "dup overlord-subject ruler @ " + std::to_string(
trigger::payload(tval[1]).tag_id.index()) +
" >national_identity_id " +
tag_to_nation() +
"= "
2340 return ">r >r dup r> swap r> swap >r dup overlord-subject ruler @ = >r dup is_substate @ r> and " +
truth_inversion(tval[0]);
2343 return ">r dup r> swap >r dup overlord-subject ruler @ = >r dup is_substate @ r> and " +
truth_inversion(tval[0]);
2352 return ">r dup " +
pop_to_owner() +
"r> swap >r dup overlord-subject ruler @ = >r dup is_substate @ r> and " +
truth_inversion(tval[0]);
2358 return ">r >r dup >index r> swap r> swap >r dup >index r> state-ptr @ are-allied? " +
truth_inversion(tval[0]);
2361 return ">r dup >index r> swap >r dup >index r> state-ptr @ are-allied? " +
truth_inversion(tval[0]);
2373 return "dup last_war_loss ptr-cast ptr(u16) @ >i32 dup 0 <> >r 365 5 * + current-date @ >i32 >= r> and " +
truth_inversion(tval[0]);
2376 return "dup " +
pop_to_owner() +
"last_war_loss ptr-cast ptr(u16) @ >i32 dup 0 <> >r 365 5 * + current-date @ >i32 >= r> and " +
truth_inversion(tval[0]);
2382 return "dup " + std::to_string(sys::national_mod_offsets::mobilization_size.index()) +
" >national_modifier_value modifier_values @ " + std::to_string(
read_float_from_payload(tval + 1)) +
" " +
compare_values(tval[0]);
2385 return "dup dup >r administrative_spending @ r> education_spending @ >= " +
truth_inversion(tval[0]);
2398 "r> dup size @ >r swap udemographics @ >f32 " + std::to_string(1.0f /
float(std::numeric_limits<uint8_t>::max())) +
" * r@ / 0.0 0.0 r> >= select else drop r> drop 0.0 end-if " + std::to_string(
read_float_from_payload(tval + 1)) +
" " +
compare_values(tval[0]);
2410 return "dup >index state-ptr @ has-any-factory " +
truth_inversion(tval[0]);
2413 return "dup >index state-ptr @ nation-has-any-factory " +
truth_inversion(tval[0]);
2423 return ">r >r dup >index r> swap r> swap >r dup >index r> state-ptr @ bankrupt-debtor-to? " +
truth_inversion(tval[0]);
2426 return ">r dup >index r> swap >r dup >index r> state-ptr @ bankrupt-debtor-to? " +
truth_inversion(tval[0]);
2435 return ">r dup " +
pop_to_owner() +
">index r> swap >r dup >index r> state-ptr @ bankrupt-debtor-to? " +
truth_inversion(tval[0]);
2438 return "dup total_ports @ >i32 " + std::to_string(tval[1]) +
" " +
compare_values(tval[0]);
2444 return "dup election_ends ptr-cast ptr(u16) @ >i32 dup 0 <> swap current-date @ >i32 > and " +
truth_inversion(tval[0]);
2462 return "dup industrial_score @ >i32 " + std::to_string(tval[1]) +
" " +
compare_values(tval[0]);
2468 return ">r >r dup industrial_score @ r> swap r> swap >r dup industrial_score @ r> " +
compare_values(tval[0]);
2471 return ">r dup industrial_score @ r> swap >r dup industrial_score @ r> " +
compare_values(tval[0]);
2483 return "dup military_score @ >i32 " + std::to_string(tval[1]) +
" " +
compare_values(tval[0]);
2489 return ">r >r dup military_score @ r> swap r> swap >r dup military_score @ r> " +
compare_values(tval[0]);
2492 return ">r dup military_score @ r> swap >r dup military_score @ r> " +
compare_values(tval[0]);
2513 return "dup owned_province_count @ >f32 >r dup occupied_count @ >f32 r@ / 0.0 0.0 r> >= select " + std::to_string(
read_float_from_payload(tval + 1)) +
" " +
compare_values(tval[0]);
2543 return "dup dup >r social_spending @ >f32 r> spending_level @ * " + std::to_string(
trigger::payload(tval[1]).signed_value) +
".0 " +
compare_values(tval[0]);
2552 return "dup dup >r military_spending @ >f32 r> spending_level @ * " + std::to_string(
trigger::payload(tval[1]).signed_value) +
".0 " +
compare_values(tval[0]);
2564 return "dup dup >r administrative_spending @ >f32 r> spending_level @ * " + std::to_string(
trigger::payload(tval[1]).signed_value) +
".0 " +
compare_values(tval[0]);
2576 return "dup dup >r education_spending @ >f32 r> spending_level @ * " + std::to_string(
trigger::payload(tval[1]).signed_value) +
".0 " +
compare_values(tval[0]);
2594 return ">r dup religion @ r> swap >r dup dominant_religion @ r> = " +
truth_inversion(tval[0]);
2652 "dup umilitancy @ >f32 " + std::to_string(10.0f /
float(std::numeric_limits<uint16_t>::max())) +
" * 0.0 r> select " + std::to_string(
read_float_from_payload(tval + 1)) +
" " +
compare_values(tval[0]);
2671 "dup umilitancy @ >f32 " + std::to_string(10.0f /
float(std::numeric_limits<uint16_t>::max())) +
" * 0.0 r> select " + std::to_string(
read_float_from_payload(tval + 1)) +
" " +
compare_values(tval[0]);
2690 "dup umilitancy @ >f32 " + std::to_string(10.0f /
float(std::numeric_limits<uint16_t>::max())) +
" * 0.0 r> select " + std::to_string(
read_float_from_payload(tval + 1)) +
" " +
compare_values(tval[0]);
2693 return "dup dup >r rich_tax @ r> poor_tax @ > " +
truth_inversion(tval[0]);
2696 return "dup culture @ culture_group_membership-member group @ cultural_union_of-culture_group identity @ valid? " +
truth_inversion(tval[0]);
2699 return "dup primary_culture @ culture_group_membership-member group @ cultural_union_of-culture_group identity @ valid? " +
truth_inversion(tval[0]);
2702 return "dup primary_culture @ culture_group_membership-member group @ cultural_union_of-culture_group identity @ >index " + std::to_string(
trigger::payload(tval[1]).tag_id.index()) +
" = " +
truth_inversion(tval[0]);
2705 return ">r >r dup " +
nation_to_tag() +
"r> swap r> swap >r dup primary_culture @ culture_group_membership-member group @ cultural_union_of-culture_group identity @ r> = " +
truth_inversion(tval[0]);
2708 return ">r dup " +
nation_to_tag() +
"r> swap >r dup primary_culture @ culture_group_membership-member group @ cultural_union_of-culture_group identity @ r> = " +
truth_inversion(tval[0]);
2714 return ">r dup " +
state_to_owner() +
nation_to_tag() +
"r> swap >r dup primary_culture @ culture_group_membership-member group @ cultural_union_of-culture_group identity @ r> = " +
truth_inversion(tval[0]);
2717 return ">r dup " +
pop_to_owner() +
nation_to_tag() +
"r> swap >r dup primary_culture @ culture_group_membership-member group @ cultural_union_of-culture_group identity @ r> = " +
truth_inversion(tval[0]);
2720 return ">r dup primary_culture @ culture_group_membership-member group @ r> swap >r dup primary_culture @ culture_group_membership-member group @ r> = " +
truth_inversion(tval[0]);
2723 return ">r dup " +
province_to_owner() +
"primary_culture @ culture_group_membership-member group @ r> swap >r dup primary_culture @ culture_group_membership-member group @ r> = " +
truth_inversion(tval[0]);
2726 return ">r dup " +
state_to_owner() +
"primary_culture @ culture_group_membership-member group @ r> swap >r dup primary_culture @ culture_group_membership-member group @ r> = " +
truth_inversion(tval[0]);
2729 return ">r dup " +
pop_to_owner() +
"primary_culture @ culture_group_membership-member group @ r> swap >r dup primary_culture @ culture_group_membership-member group @ r> = " +
truth_inversion(tval[0]);
2732 return "dup dup >r " + std::to_string(
demographics::total.index()) +
" >demographics_key demographics @ "
2733 "r@ " + std::to_string(
demographics::count_special_keys + ws.world.pop_type_size() * 2) +
" r@ primary_culture @ >index + >demographics_key demographics @ - "
2736 "dup culture-size < "
2738 "dup >culture_id r@ swap accepted_cultures @ "
2742 ">r swap r> - swap "
2746 "drop r> drop 0.0 > "
2750 return "dup dup >r " + std::to_string(
demographics::total.index()) +
" >demographics_key demographics @ "
2754 "dup culture-size < "
2756 "dup >culture_id r@ " +
state_to_owner() +
"swap accepted_cultures @ "
2760 ">r swap r> - swap "
2764 "drop r> drop 0.0 > "
2768 return "dup dup >r " + std::to_string(
demographics::total.index()) +
" >demographics_key demographics @ "
2772 "dup culture-size < "
2778 ">r swap r> - swap "
2782 "drop r> drop 0.0 > "
2795 return "dup substates_count @ >i32 " + std::to_string(tval[1]) +
" " +
compare_values(tval[0]);
2798 return "dup dup >r vassals_count @ >i32 r> substates_count @ >i32 - " + std::to_string(tval[1]) +
" " +
compare_values(tval[0]);
2801 return ">r dup active_regiments >f32 r> swap >r dup active_regiments >f32 r@ / 1000000.0 0.0 r> >= select " + std::to_string(
read_float_from_payload(tval + 1)) +
" " +
compare_values(tval[0]);
2804 return ">r >r dup active_regiments >f32 r> swap r> swap >r dup active_regiments >f32 r@ / 1000000.0 0.0 r> >= select " + std::to_string(
read_float_from_payload(tval + 1)) +
" " +
compare_values(tval[0]);
2816 return ">r >r dup r> swap r> swap >r dup constructing_cb_target @ r> = " +
truth_inversion(tval[0]);
2819 return ">r dup r> swap >r dup constructing_cb_target @ r> = " +
truth_inversion(tval[0]);
2831 return "dup constructing_cb_is_discovered @ " +
truth_inversion(tval[0]);
2837 return "dup " + std::to_string(sys::national_mod_offsets::civilization_progress_modifier.index()) +
" >national_modifier_value modifier_values @ " + std::to_string(
read_float_from_payload(tval + 1)) +
" " +
compare_values(tval[0]);
2846 return ">r >r dup overlord-subject ruler @ r> swap r> swap >r dup r> = " +
truth_inversion(tval[0]);
2849 return ">r dup overlord-subject ruler @ r> swap >r dup r> = " +
truth_inversion(tval[0]);
2885 return "dup >index state-ptr @ can-nationalize? " +
truth_inversion(tval[0]);
2894 return ">r >r dup in_sphere_of @ r> swap r> swap >r dup r> = " +
truth_inversion(tval[0]);
2897 return ">r dup in_sphere_of @ r> swap >r dup r> = " +
truth_inversion(tval[0]);
2909 return "dup owned_state_count @ >i32 " + std::to_string(tval[1]) +
" " +
compare_values(tval[0]);
2921 return "dup last_immigration ptr-cast ptr(u16) @ >i32 " + std::to_string(tval[1]) +
" + current-date @ >i32 " +
compare_values(tval[0]);
2924 return "dup last_control_change ptr-cast ptr(u16) @ >i32 " + std::to_string(tval[1]) +
" + current-date @ >i32 " +
compare_values(tval[0]);
2927 return "dup disarmed_until ptr-cast ptr(u16) @ >i32 dup 0 <> swap current-date @ >i32 > and " +
truth_inversion(tval[0]);
2930 return "dup " +
pop_to_owner() +
"disarmed_until ptr-cast ptr(u16) @ >i32 dup 0 <> swap current-date @ >i32 > and " +
truth_inversion(tval[0]);
2951 return "dup pop_movement_membership-pop movement @ get_associated_issue_option @ dup >r valid? r> parent_issue @ issue_type @ >i32 " + std::to_string(int32_t(
culture::issue_type::social)) +
" = and " +
truth_inversion(tval[0]);
2954 return "dup pop_movement_membership-pop movement @ get_associated_issue_option @ dup >r valid? r> parent_issue @ issue_type @ >i32 " + std::to_string(int32_t(
culture::issue_type::political)) +
" = and " +
truth_inversion(tval[0]);
2967 return "dup >index state-ptr @ has-union-sphere? " +
truth_inversion(tval[0]);
2973 return ">r dup culture @ r> swap >r dup culture r> = " +
truth_inversion(tval[0]);
2997 return ">r dup religion @ r> swap >r dup religion r> = " +
truth_inversion(tval[0]);
3000 return ">r dup religion @ >index r> swap >r dup r> " + std::to_string(
demographics::count_special_keys + ws.world.pop_type_size() * 2 + ws.world.culture_size() + ws.world.ideology_size() + ws.world.issue_option_size()) +
" + >demographics_key demographics @ 0.0 > " +
truth_inversion(tval[0]);
3003 return ">r dup religion @ >index r> swap >r dup r> " + std::to_string(
demographics::count_special_keys + ws.world.pop_type_size() * 2 + ws.world.culture_size() + ws.world.ideology_size() + ws.world.issue_option_size()) +
" + >demographics_key demographics @ 0.0 > " +
truth_inversion(tval[0]);
3006 return ">r dup religion @ >index r> swap >r dup r> " + std::to_string(
demographics::count_special_keys + ws.world.pop_type_size() * 2 + ws.world.culture_size() + ws.world.ideology_size() + ws.world.issue_option_size()) +
" + >demographics_key demographics @ 0.0 > " +
truth_inversion(tval[0]);
3021 return "dup ulife_needs_satisfaction @ >f32 " + std::to_string(1.0f /
float(std::numeric_limits<uint8_t>::max())) +
" * " + std::to_string(
read_float_from_payload(tval + 1)) +
" " +
compare_values(tval[0]);
3024 return "dup ueveryday_needs_satisfaction @ >f32 " + std::to_string(1.0f /
float(std::numeric_limits<uint8_t>::max())) +
" * " + std::to_string(
read_float_from_payload(tval + 1)) +
" " +
compare_values(tval[0]);
3027 return "dup uluxury_needs_satisfaction @ >f32 " + std::to_string(1.0f /
float(std::numeric_limits<uint8_t>::max())) +
" * " + std::to_string(
read_float_from_payload(tval + 1)) +
" " +
compare_values(tval[0]);
3030 return "dup uconsciousness @ >f32 " + std::to_string(10.0f /
float(std::numeric_limits<uint16_t>::max())) +
" * " + std::to_string(
read_float_from_payload(tval + 1)) +
" " +
compare_values(tval[0]);
3042 return "dup uliteracy @ >f32 " + std::to_string(1.0f /
float(std::numeric_limits<uint16_t>::max())) +
" * " + std::to_string(
read_float_from_payload(tval + 1)) +
" " +
compare_values(tval[0]);
3054 return "dup umilitancy @ >f32 " + std::to_string(10.0f /
float(std::numeric_limits<uint16_t>::max())) +
" * " + std::to_string(
read_float_from_payload(tval + 1)) +
" " +
compare_values(tval[0]);
3069 return "dup state_membership @ >index " + std::to_string(
trigger::payload(tval[1]).com_id.index()) +
" state-ptr @ state-has-rgo? " +
truth_inversion(tval[0]);
3093 return "dup >index state-ptr @ in-crisis? " +
truth_inversion(tval[0]);
3207 return "dup >index " + std::to_string(
trigger::payload(tval[2]).tag_id.index()) +
" >national_identity_id " +
tag_to_nation() +
">index state-ptr @ influence-on " + std::to_string(tval[1]) +
".0 " +
compare_values(tval[0]);
3210 return ">r dup r> swap >r dup >index r> >index state-ptr @ influence-on " + std::to_string(tval[1]) +
".0 " +
compare_values(tval[0]);
3213 return ">r dup " +
province_to_owner() +
"r> swap >r dup >index r> >index state-ptr @ influence-on " + std::to_string(tval[1]) +
".0 " +
compare_values(tval[0]);
3216 return ">r >r dup r> swap r> swap >r dup >index r> >index state-ptr @ influence-on " + std::to_string(tval[1]) +
".0 " +
compare_values(tval[0]);
3219 return ">r >r dup " +
province_to_owner() +
"r> swap r> swap >r dup >index r> >index state-ptr @ influence-on " + std::to_string(tval[1]) +
".0 " +
compare_values(tval[0]);
3237 return "dup uemployment @ >f32 " + std::to_string(1.0f /
float(std::numeric_limits<uint8_t>::max())) +
" * 1.0 swap - " + std::to_string(
read_float_from_payload(tval + 1)) +
" " +
compare_values(tval[0]);
3241 ">r dup poptype @ >index r> swap >r "
3248 ">r dup poptype @ >index r> swap >r "
3255 ">r dup poptype @ >index r> swap >r "
3332 "dup " + std::to_string(sys::provincial_mod_offsets::min_build_railroad.index()) +
" >provincial_modifier_value modifier_values @ r> + r> < " +
truth_inversion(tval[0]);
3337 "dup " + std::to_string(sys::provincial_mod_offsets::min_build_railroad.index()) +
" >provincial_modifier_value modifier_values @ r> + r> < " +
truth_inversion(tval[0]);
3342 "dup " + std::to_string(sys::provincial_mod_offsets::min_build_railroad.index()) +
" >provincial_modifier_value modifier_values @ r> + r> < " +
truth_inversion(tval[0]);
3347 "dup " + std::to_string(sys::provincial_mod_offsets::min_build_railroad.index()) +
" >provincial_modifier_value modifier_values @ r> + r> < " +
truth_inversion(tval[0]);
3352 "dup " + std::to_string(sys::provincial_mod_offsets::min_build_fort.index()) +
" >provincial_modifier_value modifier_values @ r> + r> < " +
truth_inversion(tval[0]);
3357 "dup " + std::to_string(sys::provincial_mod_offsets::min_build_fort.index()) +
" >provincial_modifier_value modifier_values @ r> + r> < " +
truth_inversion(tval[0]);
3362 "dup " + std::to_string(sys::provincial_mod_offsets::min_build_fort.index()) +
" >provincial_modifier_value modifier_values @ r> + r> < " +
truth_inversion(tval[0]);
3367 "dup " + std::to_string(sys::provincial_mod_offsets::min_build_fort.index()) +
" >provincial_modifier_value modifier_values @ r> + r> < " +
truth_inversion(tval[0]);
3370 return ">r >r dup >index r> swap r> swap >r dup >index r> state-ptr @ can-build-naval-base? " +
truth_inversion(tval[0]);
3373 return ">r >r dup >index r> swap r> swap >r dup >index r> state-ptr @ can-build-naval-base? " +
truth_inversion(tval[0]);
3376 return ">r dup >index r> swap >r dup >index r> state-ptr @ can-build-naval-base? " +
truth_inversion(tval[0]);
3379 return ">r dup >index r> swap >r dup >index r> state-ptr @ can-build-naval-base? " +
truth_inversion(tval[0]);
3421 return "dup " + std::to_string(
demographics::total.index()) +
" >demographics_key demographics @ >r "
3426 return "dup " + std::to_string(
demographics::total.index()) +
" >demographics_key demographics @ >r "
3431 return "dup " + std::to_string(
demographics::total.index()) +
" >demographics_key demographics @ >r "
3440 return "dup " + std::to_string(
demographics::total.index()) +
" >demographics_key demographics @ >r "
3445 return "dup " + std::to_string(
demographics::total.index()) +
" >demographics_key demographics @ >r "
3450 return "dup " + std::to_string(
demographics::total.index()) +
" >demographics_key demographics @ >r "
3483 return "dup " + std::to_string(
demographics::total.index()) +
" >demographics_key demographics @ >r "
3488 return "dup " + std::to_string(
demographics::total.index()) +
" >demographics_key demographics @ >r "
3493 return "dup " + std::to_string(
demographics::total.index()) +
" >demographics_key demographics @ >r "
3509 return ">r >r dup religion @ r> swap r> swap >r dup religion @ r> = " +
truth_inversion(tval[0]);
3512 return ">r >r dup religion @ r> swap r> swap >r dup religion @ r> = " +
truth_inversion(tval[0]);
3515 return ">r dup religion @ r> swap >r dup religion @ r> = " +
truth_inversion(tval[0]);
3537 auto tid = ws.world.stored_trigger_get_function(sid);
3553 return "dup >index >r " + std::to_string(new_name.index()) +
" " + std::to_string(ideo.index()) +
" r> state-ptr @ has-named-party? " +
truth_inversion(tval[0]);
3555 return "dup ruling_party @ name @ " + std::to_string(new_name.index()) +
" >text_key = " +
truth_inversion(tval[0]);
3564 return "dup >index >r " + std::to_string(new_opt.index()) +
" " + std::to_string(ideo.index()) +
" r> state-ptr @ has-positioned-party? " +
truth_inversion(tval[0]);
3566 auto popt = ws.world.issue_option_get_parent_issue(new_opt);
3567 return "dup ruling_party @ " + std::to_string(popt.id.index()) +
" >issue_id party_issues @ " + std::to_string(new_opt.index()) +
" >issue_option_id = " +
truth_inversion(tval[0]);
3575#define TRIGGER_BYTECODE_ELEMENT(code, name, arg) tf_##name ,
3577#undef TRIGGER_BYTECODE_ELEMENT
3582 tf_x_neighbor_province_scope,
3583 tf_x_neighbor_country_scope_nation,
3584 tf_x_neighbor_country_scope_pop,
3585 tf_x_war_countries_scope_nation,
3586 tf_x_war_countries_scope_pop,
3587 tf_x_greater_power_scope,
3588 tf_x_owned_province_scope_state,
3589 tf_x_owned_province_scope_nation,
3590 tf_x_core_scope_province,
3591 tf_x_core_scope_nation,
3593 tf_x_substate_scope,
3594 tf_x_sphere_member_scope,
3595 tf_x_pop_scope_province,
3596 tf_x_pop_scope_state,
3597 tf_x_pop_scope_nation,
3598 tf_x_provinces_in_variable_region,
3599 tf_owner_scope_state,
3600 tf_owner_scope_province,
3601 tf_controller_scope,
3603 tf_country_scope_state,
3604 tf_country_scope_pop,
3615 tf_cultural_union_scope,
3617 tf_sphere_owner_scope,
3618 tf_independence_scope,
3619 tf_flashpoint_tag_scope,
3620 tf_crisis_state_scope,
3622 tf_state_scope_province,
3625 tf_country_scope_nation,
3626 tf_country_scope_province,
3627 tf_cultural_union_scope_pop,
3628 tf_capital_scope_province,
3629 tf_capital_scope_pop,
3631 tf_x_neighbor_province_scope_state,
3632 tf_x_provinces_in_variable_region_proper,
3642 auto base = state.value_modifiers[modifier];
3644 result += std::to_string(base.factor) +
" >r ";
3646 for(
uint32_t i = 0; i < base.segments_count; ++i) {
3647 auto seg = state.value_modifier_segments[base.first_segment_offset + i];
3649 result +=
test_trigger_generic(state.trigger_data.data() + state.trigger_data_indices[seg.condition.index() + 1], state);
3650 result +=
"1.0 swap " + std::to_string(seg.factor) +
" swap select r> * >r ";
3656 auto base = state.value_modifiers[modifier];
3658 result += std::to_string(base.base) +
" >r ";
3660 for(
uint32_t i = 0; i < base.segments_count; ++i) {
3661 auto seg = state.value_modifier_segments[base.first_segment_offset + i];
3663 result +=
test_trigger_generic(state.trigger_data.data() + state.trigger_data_indices[seg.condition.index() + 1], state);
3664 result +=
"0.0 swap " + std::to_string(seg.factor) +
" swap select r> + >r ";
3667 result +=
"r> " + std::to_string(base.factor) +
" * >r ";
3672 return test_trigger_generic(state.trigger_data.data() + state.trigger_data_indices[key.index() + 1], state);
3676#undef TRIGGER_FUNCTION
#define TRIGGER_FUNCTION(function_name)
constexpr dcon::demographics_key rich_life_needs(13)
constexpr dcon::demographics_key poor_luxury_needs(17)
constexpr dcon::demographics_key middle_life_needs(12)
constexpr dcon::demographics_key rich_militancy(10)
constexpr dcon::demographics_key middle_total(21)
constexpr dcon::demographics_key middle_luxury_needs(18)
constexpr dcon::demographics_key political_reform_desire(6)
constexpr dcon::demographics_key total(0)
constexpr dcon::demographics_key rich_everyday_needs(16)
constexpr dcon::demographics_key poor_militancy(8)
constexpr dcon::demographics_key rich_luxury_needs(19)
constexpr dcon::demographics_key poor_everyday_needs(14)
constexpr dcon::demographics_key middle_militancy(9)
dcon::demographics_key to_key(sys::state const &state, dcon::pop_type_id v)
constexpr uint32_t count_special_keys
constexpr dcon::demographics_key employable(1)
constexpr dcon::demographics_key consciousness(3)
constexpr dcon::demographics_key rich_total(22)
constexpr dcon::demographics_key poor_total(20)
constexpr dcon::demographics_key poor_life_needs(11)
constexpr dcon::demographics_key employed(2)
dcon::demographics_key to_employment_key(sys::state const &state, dcon::pop_type_id v)
constexpr dcon::demographics_key social_reform_desire(7)
constexpr dcon::demographics_key literacy(5)
constexpr dcon::demographics_key middle_everyday_needs(15)
constexpr dcon::demographics_key militancy(4)
int32_t read_int32_t_from_payload(uint16_t const *data)
float read_float_from_payload(uint16_t const *data)
std::string nation_to_union_holder()
std::string culture_to_union_holder()
std::string CALLTYPE test_trigger_generic(uint16_t const *tval, sys::state &ws)
std::string evaluate(sys::state &state, dcon::trigger_key key)
std::string multiplicative_modifier(sys::state &state, dcon::value_modifier_key modifier)
std::string compare_values_eq(uint16_t trigger_code)
std::string additive_modifier(sys::state &state, dcon::value_modifier_key modifier)
std::string compare_values(uint16_t trigger_code)
std::string overlord_from_subject()
std::string demo_culture_key(sys::state &ws)
std::string truth_inversion(uint16_t trigger_code)
std::string province_to_controller()
std::string tag_to_nation()
std::string nation_to_tag()
std::string province_to_owner()
std::string pop_to_location()
std::string pop_to_owner()
std::string state_to_owner()
constexpr uint32_t slavery_allowed
constexpr uint32_t pop_build_factory
constexpr uint32_t count_special_keys
constexpr uint16_t code_mask
int32_t get_trigger_scope_payload_size(uint16_t const *data)
constexpr uint16_t is_disjunctive_scope
int32_t read_int32_t_from_payload(uint16_t const *data)
constexpr uint16_t association_gt
constexpr uint16_t association_le
constexpr uint16_t association_ge
constexpr uint16_t association_mask
constexpr uint16_t association_lt
constexpr uint16_t is_existence_scope
int32_t trigger_scope_data_payload(uint16_t code)
int32_t get_trigger_payload_size(uint16_t const *data)
constexpr uint16_t association_ne
constexpr uint16_t association_eq
#define TRIGGER_BYTECODE_LIST
static constexpr sys::state & ws
static constexpr std::string(CALLTYPE *trigger_functions[])(uint16_t const *tval
Holds important data about the game world, state, and other data regarding windowing,...
dcon::data_container world
dcon::national_identity_id tag_id
dcon::stored_trigger_id str_id
dcon::province_id prov_id
dcon::ideology_id ideo_id
dcon::pop_type_id popt_id
dcon::issue_option_id opt_id