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 = "
1506 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]);
1509 return "dup >index >r >r >r dup defection_target @ >index r> swap r> swap r> state-ptr @ core-in-province " +
truth_inversion(tval[0]);
1512 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]);
1536 return "dup rebel_controlled_count @ >i32 " + std::to_string(tval[1]) +
" " +
compare_values(tval[0]);
1539 return "dup central_province_count @ >f32 >r dup central_rebel_controlled @ >f32 r@ / 0.0 r> 0.0 <= select "
1543 return "dup owned_province_count @ >i32 " + std::to_string(tval[1]) +
" " +
compare_values(tval[0]);
1546 return ">r >r dup owned_province_count @ r> swap r> swap >r dup owned_province_count @ r> " +
compare_values(tval[0]);
1549 return ">r dup owned_province_count @ r> swap >r dup owned_province_count @ r> " +
compare_values(tval[0]);
1558 return ">r dup " +
pop_to_owner() +
"owned_province_count @ r> swap >r dup owned_province_count @ r> " +
compare_values(tval[0]);
1561 return "dup central_ports @ >i32 " + std::to_string(tval[1]) +
" " +
compare_values(tval[0]);
1564 return "dup allies_count @ >i32 " + std::to_string(tval[1]) +
" " +
compare_values(tval[0]);
1567 return "dup vassals_count @ >i32 " + std::to_string(tval[1]) +
" " +
compare_values(tval[0]);
1606 return "dup owned_province_count @ >i32 0 <> " +
truth_inversion(tval[0]);
1636 return ">r dup capital @ continent @ r> swap >r dup capital @ continent @ r> = " +
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 continent @ r> = " +
truth_inversion(tval[0]);
1648 return ">r >r dup capital @ continent @ r> swap r> swap >r dup capital @ 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 continent @ r> = " +
truth_inversion(tval[0]);
1663 return ">r >r dup r> swap r> swap >r dup >index r> >index state-ptr @ has-cb-against " +
truth_inversion(tval[0]);
1666 return ">r >dup r> swap >r dup >index r> >index state-ptr @ has-cb-against " +
truth_inversion(tval[0]);
1681 return ">r >r dup >index r> swap r> swap >r dup >index r> state-ptr @ has-access-with " +
truth_inversion(tval[0]);
1684 return ">r dup >index r> swap >r dup >index r> state-ptr @ has-access-with " +
truth_inversion(tval[0]);
1699 return ">r >r dup prestige @ r> swap r> swap >r dup prestige @ r> " +
compare_values(tval[0]);
1702 return ">r dup prestige @ r> swap >r dup prestige @ r> " +
compare_values(tval[0]);
1726 return "dup >index state-ptr @ has-any-factory " +
truth_inversion(tval[0]);
1732 return "dup state_membership @ >index " + std::to_string(
trigger::payload(tval[1]).fac_id.index()) +
" state-ptr @ has-factory " +
truth_inversion(tval[0]);
1735 return "dup state_membership @ >index state-ptr @ has-any-factory " +
truth_inversion(tval[0]);
1756 return "dup abstract_state_membership-province state @ >index " + std::to_string(
trigger::payload(tval[1]).state_id.index()) +
" " +
compare_values_eq(tval[0]);
1790 return ">r >r dup r> swap r> swap >r dup r> = " +
truth_inversion(tval[0]);
1802 return ">r dup active_regiments @ r> swap >r dup active_regiments @ r> " +
compare_values(tval[0]);
1814 return ">r >r dup active_regiments @ r> swap r> swap >r dup active_regiments @ r> " +
compare_values(tval[0]);
1823 return ">r dup >index r> swap >r dup >index r> state-ptr @ nation-a " +
truth_inversion(tval[0]);
1826 return ">r >r dup >index r> swap r> swap >r dup >index r> state-ptr @ nation-a " +
truth_inversion(tval[0]);
1835 return ">r >r dup >index r> swap r> swap >r dup >index r> swap state-ptr @ units-in-state " +
truth_inversion(tval[0]);
1838 return ">r dup >index r> swap >r dup >index r> swap state-ptr @ units-in-state " +
truth_inversion(tval[0]);
1847 return ">r dup " +
pop_to_owner() +
">index r> swap >r dup >index r> swap state-ptr @ units-in-state " +
truth_inversion(tval[0]);
1853 return "dup >index state-ptr @ count-p-units " + std::to_string(int32_t(tval[1])) +
" " +
compare_values(tval[0]);
1860 return "dup >index >r >r >r dup >index r> swap r> swap r> state-ptr @ units-in-province " +
truth_inversion(tval[0]);
1863 return "dup >index >r >r dup >index r> swap r> state-ptr @ units-in-province " +
truth_inversion(tval[0]);
1878 return ">r >r dup >index r> swap r> swap >r dup >index r> state-ptr @ at-war? " +
truth_inversion(tval[0]);
1881 return ">r dup >index r> swap >r dup >index r> state-ptr @ at-war? " +
truth_inversion(tval[0]);
1893 return "dup land_battle_location-location size 0 <> " +
truth_inversion(tval[0]);
1896 return "dup >index state-ptr @ general-in-province? " +
truth_inversion(tval[0]);
1905 return "dup active_regiments @ >i32 " + std::to_string(int32_t(tval[1])) +
" " +
compare_values(tval[0]);
1917 return "dup overlord-subject ruler @ valid? " +
truth_inversion(tval[0]);
1938 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]);
1944 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]);
1947 return "dup >index state-ptr @ count-ships " + std::to_string(int32_t(tval[1])) +
" " +
compare_values(tval[0]);
1956 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]);
1977 return ">r >r dup r> swap r> swap >r dup primary_culture @ r> primary_culture @ = " +
truth_inversion(tval[0]);
1983 return ">r dup r> swap >r dup primary_culture @ r> primary_culture @ = " +
truth_inversion(tval[0]);
1986 return ">r dup culture @ r> swap >r dup primary_culture @ r> = " +
truth_inversion(tval[0]);
1995 return ">r dup r> swap >r dup dominant_culture @ r> primary_culture @ = " +
truth_inversion(tval[0]);
2007 return ">r dup r> swap >r dup dominant_culture @ r> primary_culture @ = " +
truth_inversion(tval[0]);
2019 return ">r dup r> swap >r dup culture @ r> primary_culture @ = " +
truth_inversion(tval[0]);
2032 return ">r dup primary_culture @ r> swap >r dup r> accepted_cultures @ " +
truth_inversion(tval[0]);
2035 return ">r dup culture @ r> swap >r dup r> accepted_cultures @ " +
truth_inversion(tval[0]);
2068 return ">r dup r> swap >r dup culture r> swap accepted_cultures @ " +
truth_inversion(tval[0]);
2093 return "dup >index state-ptr @ coastal-s? @ " +
truth_inversion(tval[0]);
2099 return ">r >r dup r> swap r> swap >r dup in_sphere_of @ r> = " +
truth_inversion(tval[0]);
2102 return ">r dup r> swap >r dup in_sphere_of @ r> = " +
truth_inversion(tval[0]);
2160 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]);
2169 return ">r dup culture @ >index r> swap >r dup >index r> state-ptr @ has-culture-core? " +
truth_inversion(tval[0]);
2172 return "dup nationalism @ " + std::to_string(
float(tval[1])) +
" " +
compare_values(tval[0]);
2175 return "dup dup >r " +
province_to_owner() +
"capital @ dup continent @ r@ continent @ = not r> swap >r >r "
2176 "connected_region_id @ r> connected_region_id @ <> r> and " +
truth_inversion(tval[0]);
2180 "connected_region_id @ r> connected_region_id @ <> r> and " +
truth_inversion(tval[0]);
2183 return "dup capital @ dup >r " +
province_to_owner() +
"capital @ dup continent @ r@ continent @ = not r> swap >r >r "
2184 "connected_region_id @ r> connected_region_id @ <> r> and " +
truth_inversion(tval[0]);
2187 return "dup province_rebel_control-province rebel_faction @ valid? " +
truth_inversion(tval[0]);
2211 return ">r >r dup r> swap r> swap >r dup province_rebel_control-province rebel_faction @ r> = " +
truth_inversion(tval[0]);
2214 return std::to_string(tval[1] - 1) +
" state-ptr @ canal-enabled? " +
truth_inversion(tval[0]);
2217 return "dup dup >r state_membership @ capital @ r> = " +
truth_inversion(tval[0]);
2226 return ">r >r dup r> swap r> swap >r dup >index r> >index state-ptr @ truce-with? " +
truth_inversion(tval[0]);
2229 return ">r dup r> swap >r dup >index r> >index state-ptr @ truce-with? " +
truth_inversion(tval[0]);
2265 return "dup >index state-ptr @ empty-a-province " +
truth_inversion(tval[0]);
2276 return "dup >index >r false 0"
2278 ">r dup not r> swap >r "
2279 "dup national_identity-size < r> and "
2281 "dup r@ swap state-ptr @ can-release? "
2282 ">r swap drop r> swap "
2298 return ">r >r dup r> swap r> swap >r dup overlord-subject ruler @ = " +
truth_inversion(tval[0]);
2301 return ">r dup r> swap >r dup overlord-subject ruler @ = " +
truth_inversion(tval[0]);
2332 return "dup overlord-subject ruler @ " + std::to_string(
trigger::payload(tval[1]).tag_id.index()) +
" >national_identity_id " +
tag_to_nation() +
"= "
2336 return ">r >r dup r> swap r> swap >r dup overlord-subject ruler @ = >r dup is_substate @ r> and " +
truth_inversion(tval[0]);
2339 return ">r dup r> swap >r dup overlord-subject ruler @ = >r dup is_substate @ r> and " +
truth_inversion(tval[0]);
2348 return ">r dup " +
pop_to_owner() +
"r> swap >r dup overlord-subject ruler @ = >r dup is_substate @ r> and " +
truth_inversion(tval[0]);
2354 return ">r >r dup >index r> swap r> swap >r dup >index r> state-ptr @ are-allied? " +
truth_inversion(tval[0]);
2357 return ">r dup >index r> swap >r dup >index r> state-ptr @ are-allied? " +
truth_inversion(tval[0]);
2369 return "dup last_war_loss ptr-cast ptr(u16) @ >i32 dup 0 <> >r 365 5 * + current-date @ >i32 >= r> and " +
truth_inversion(tval[0]);
2372 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]);
2378 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]);
2381 return "dup dup >r administrative_spending @ r> education_spending @ >= " +
truth_inversion(tval[0]);
2394 "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]);
2406 return "dup >index state-ptr @ has-any-factory " +
truth_inversion(tval[0]);
2409 return "dup >index state-ptr @ nation-has-any-factory " +
truth_inversion(tval[0]);
2419 return ">r >r dup >index r> swap r> swap >r dup >index r> state-ptr @ bankrupt-debtor-to? " +
truth_inversion(tval[0]);
2422 return ">r dup >index r> swap >r dup >index r> state-ptr @ bankrupt-debtor-to? " +
truth_inversion(tval[0]);
2431 return ">r dup " +
pop_to_owner() +
">index r> swap >r dup >index r> state-ptr @ bankrupt-debtor-to? " +
truth_inversion(tval[0]);
2434 return "dup total_ports @ >i32 " + std::to_string(tval[1]) +
" " +
compare_values(tval[0]);
2440 return "dup election_ends ptr-cast ptr(u16) @ >i32 dup 0 <> swap current-date @ >i32 > and " +
truth_inversion(tval[0]);
2458 return "dup industrial_score @ >i32 " + std::to_string(tval[1]) +
" " +
compare_values(tval[0]);
2464 return ">r >r dup industrial_score @ r> swap r> swap >r dup industrial_score @ r> " +
compare_values(tval[0]);
2467 return ">r dup industrial_score @ r> swap >r dup industrial_score @ r> " +
compare_values(tval[0]);
2479 return "dup military_score @ >i32 " + std::to_string(tval[1]) +
" " +
compare_values(tval[0]);
2485 return ">r >r dup military_score @ r> swap r> swap >r dup military_score @ r> " +
compare_values(tval[0]);
2488 return ">r dup military_score @ r> swap >r dup military_score @ r> " +
compare_values(tval[0]);
2509 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]);
2539 return "dup dup >r social_spending @ >f32 r> spending_level @ * " + std::to_string(
trigger::payload(tval[1]).signed_value) +
".0 " +
compare_values(tval[0]);
2548 return "dup dup >r military_spending @ >f32 r> spending_level @ * " + std::to_string(
trigger::payload(tval[1]).signed_value) +
".0 " +
compare_values(tval[0]);
2560 return "dup dup >r administrative_spending @ >f32 r> spending_level @ * " + std::to_string(
trigger::payload(tval[1]).signed_value) +
".0 " +
compare_values(tval[0]);
2572 return "dup dup >r education_spending @ >f32 r> spending_level @ * " + std::to_string(
trigger::payload(tval[1]).signed_value) +
".0 " +
compare_values(tval[0]);
2590 return ">r dup religion @ r> swap >r dup dominant_religion @ r> = " +
truth_inversion(tval[0]);
2648 "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]);
2667 "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]);
2686 "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]);
2689 return "dup dup >r rich_tax @ r> poor_tax @ > " +
truth_inversion(tval[0]);
2692 return "dup culture @ culture_group_membership-member group @ cultural_union_of-culture_group identity @ valid? " +
truth_inversion(tval[0]);
2695 return "dup primary_culture @ culture_group_membership-member group @ cultural_union_of-culture_group identity @ valid? " +
truth_inversion(tval[0]);
2698 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]);
2701 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]);
2704 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]);
2710 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]);
2713 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]);
2716 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]);
2719 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]);
2722 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]);
2725 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]);
2728 return "dup dup >r " + std::to_string(
demographics::total.index()) +
" >demographics_key demographics @ "
2729 "r@ " + std::to_string(
demographics::count_special_keys + ws.world.pop_type_size() * 2) +
" r@ primary_culture @ >index + >demographics_key demographics @ - "
2732 "dup culture-size < "
2734 "dup >culture_id r@ swap accepted_cultures @ "
2738 ">r swap r> - swap "
2742 "drop r> drop 0.0 > "
2746 return "dup dup >r " + std::to_string(
demographics::total.index()) +
" >demographics_key demographics @ "
2750 "dup culture-size < "
2752 "dup >culture_id r@ " +
state_to_owner() +
"swap accepted_cultures @ "
2756 ">r swap r> - swap "
2760 "drop r> drop 0.0 > "
2764 return "dup dup >r " + std::to_string(
demographics::total.index()) +
" >demographics_key demographics @ "
2768 "dup culture-size < "
2774 ">r swap r> - swap "
2778 "drop r> drop 0.0 > "
2791 return "dup substates_count @ >i32 " + std::to_string(tval[1]) +
" " +
compare_values(tval[0]);
2794 return "dup dup >r vassals_count @ >i32 r> substates_count @ >i32 - " + std::to_string(tval[1]) +
" " +
compare_values(tval[0]);
2797 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]);
2800 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]);
2812 return ">r >r dup r> swap r> swap >r dup constructing_cb_target @ r> = " +
truth_inversion(tval[0]);
2815 return ">r dup r> swap >r dup constructing_cb_target @ r> = " +
truth_inversion(tval[0]);
2827 return "dup constructing_cb_is_discovered @ " +
truth_inversion(tval[0]);
2833 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]);
2842 return ">r >r dup overlord-subject ruler @ r> swap r> swap >r dup r> = " +
truth_inversion(tval[0]);
2845 return ">r dup overlord-subject ruler @ r> swap >r dup r> = " +
truth_inversion(tval[0]);
2881 return "dup >index state-ptr @ can-nationalize? " +
truth_inversion(tval[0]);
2890 return ">r >r dup in_sphere_of @ r> swap r> swap >r dup r> = " +
truth_inversion(tval[0]);
2893 return ">r dup in_sphere_of @ r> swap >r dup r> = " +
truth_inversion(tval[0]);
2905 return "dup owned_state_count @ >i32 " + std::to_string(tval[1]) +
" " +
compare_values(tval[0]);
2917 return "dup last_immigration ptr-cast ptr(u16) @ >i32 " + std::to_string(tval[1]) +
" + current-date @ >i32 " +
compare_values(tval[0]);
2920 return "dup last_control_change ptr-cast ptr(u16) @ >i32 " + std::to_string(tval[1]) +
" + current-date @ >i32 " +
compare_values(tval[0]);
2923 return "dup disarmed_until ptr-cast ptr(u16) @ >i32 dup 0 <> swap current-date @ >i32 > and " +
truth_inversion(tval[0]);
2926 return "dup " +
pop_to_owner() +
"disarmed_until ptr-cast ptr(u16) @ >i32 dup 0 <> swap current-date @ >i32 > and " +
truth_inversion(tval[0]);
2947 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]);
2950 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]);
2963 return "dup >index state-ptr @ has-union-sphere? " +
truth_inversion(tval[0]);
2969 return ">r dup culture @ r> swap >r dup culture r> = " +
truth_inversion(tval[0]);
2993 return ">r dup religion @ r> swap >r dup religion r> = " +
truth_inversion(tval[0]);
2996 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]);
2999 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]);
3002 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]);
3017 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]);
3020 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]);
3023 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]);
3026 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]);
3038 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]);
3050 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]);
3065 return "dup state_membership @ >index " + std::to_string(
trigger::payload(tval[1]).com_id.index()) +
" state-ptr @ state-has-rgo? " +
truth_inversion(tval[0]);
3089 return "dup >index state-ptr @ in-crisis? " +
truth_inversion(tval[0]);
3203 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]);
3206 return ">r dup r> swap >r dup >index r> >index state-ptr @ influence-on " + std::to_string(tval[1]) +
".0 " +
compare_values(tval[0]);
3209 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]);
3212 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]);
3215 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]);
3233 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]);
3237 ">r dup poptype @ >index r> swap >r "
3244 ">r dup poptype @ >index r> swap >r "
3251 ">r dup poptype @ >index r> swap >r "
3328 "dup " + std::to_string(sys::provincial_mod_offsets::min_build_railroad.index()) +
" >provincial_modifier_value modifier_values @ r> + r> < " +
truth_inversion(tval[0]);
3333 "dup " + std::to_string(sys::provincial_mod_offsets::min_build_railroad.index()) +
" >provincial_modifier_value modifier_values @ r> + r> < " +
truth_inversion(tval[0]);
3338 "dup " + std::to_string(sys::provincial_mod_offsets::min_build_railroad.index()) +
" >provincial_modifier_value modifier_values @ r> + r> < " +
truth_inversion(tval[0]);
3343 "dup " + std::to_string(sys::provincial_mod_offsets::min_build_railroad.index()) +
" >provincial_modifier_value modifier_values @ r> + r> < " +
truth_inversion(tval[0]);
3348 "dup " + std::to_string(sys::provincial_mod_offsets::min_build_fort.index()) +
" >provincial_modifier_value modifier_values @ r> + r> < " +
truth_inversion(tval[0]);
3353 "dup " + std::to_string(sys::provincial_mod_offsets::min_build_fort.index()) +
" >provincial_modifier_value modifier_values @ r> + r> < " +
truth_inversion(tval[0]);
3358 "dup " + std::to_string(sys::provincial_mod_offsets::min_build_fort.index()) +
" >provincial_modifier_value modifier_values @ r> + r> < " +
truth_inversion(tval[0]);
3363 "dup " + std::to_string(sys::provincial_mod_offsets::min_build_fort.index()) +
" >provincial_modifier_value modifier_values @ r> + r> < " +
truth_inversion(tval[0]);
3366 return ">r >r dup >index r> swap r> swap >r dup >index r> state-ptr @ can-build-naval-base? " +
truth_inversion(tval[0]);
3369 return ">r >r dup >index r> swap r> swap >r dup >index r> state-ptr @ can-build-naval-base? " +
truth_inversion(tval[0]);
3372 return ">r dup >index r> swap >r dup >index r> state-ptr @ can-build-naval-base? " +
truth_inversion(tval[0]);
3375 return ">r dup >index r> swap >r dup >index r> state-ptr @ can-build-naval-base? " +
truth_inversion(tval[0]);
3417 return "dup " + std::to_string(
demographics::total.index()) +
" >demographics_key demographics @ >r "
3422 return "dup " + std::to_string(
demographics::total.index()) +
" >demographics_key demographics @ >r "
3427 return "dup " + std::to_string(
demographics::total.index()) +
" >demographics_key demographics @ >r "
3436 return "dup " + std::to_string(
demographics::total.index()) +
" >demographics_key demographics @ >r "
3441 return "dup " + std::to_string(
demographics::total.index()) +
" >demographics_key demographics @ >r "
3446 return "dup " + std::to_string(
demographics::total.index()) +
" >demographics_key demographics @ >r "
3479 return "dup " + std::to_string(
demographics::total.index()) +
" >demographics_key demographics @ >r "
3484 return "dup " + std::to_string(
demographics::total.index()) +
" >demographics_key demographics @ >r "
3489 return "dup " + std::to_string(
demographics::total.index()) +
" >demographics_key demographics @ >r "
3505 return ">r >r dup religion @ r> swap r> swap >r dup religion @ r> = " +
truth_inversion(tval[0]);
3508 return ">r >r dup religion @ r> swap r> swap >r dup religion @ r> = " +
truth_inversion(tval[0]);
3511 return ">r dup religion @ r> swap >r dup religion @ r> = " +
truth_inversion(tval[0]);
3533 auto tid = ws.world.stored_trigger_get_function(sid);
3549 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]);
3551 return "dup ruling_party @ name @ " + std::to_string(new_name.index()) +
" >text_key = " +
truth_inversion(tval[0]);
3560 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]);
3562 auto popt = ws.world.issue_option_get_parent_issue(new_opt);
3563 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]);
3571#define TRIGGER_BYTECODE_ELEMENT(code, name, arg) tf_##name ,
3573#undef TRIGGER_BYTECODE_ELEMENT
3578 tf_x_neighbor_province_scope,
3579 tf_x_neighbor_country_scope_nation,
3580 tf_x_neighbor_country_scope_pop,
3581 tf_x_war_countries_scope_nation,
3582 tf_x_war_countries_scope_pop,
3583 tf_x_greater_power_scope,
3584 tf_x_owned_province_scope_state,
3585 tf_x_owned_province_scope_nation,
3586 tf_x_core_scope_province,
3587 tf_x_core_scope_nation,
3589 tf_x_substate_scope,
3590 tf_x_sphere_member_scope,
3591 tf_x_pop_scope_province,
3592 tf_x_pop_scope_state,
3593 tf_x_pop_scope_nation,
3594 tf_x_provinces_in_variable_region,
3595 tf_owner_scope_state,
3596 tf_owner_scope_province,
3597 tf_controller_scope,
3599 tf_country_scope_state,
3600 tf_country_scope_pop,
3611 tf_cultural_union_scope,
3613 tf_sphere_owner_scope,
3614 tf_independence_scope,
3615 tf_flashpoint_tag_scope,
3616 tf_crisis_state_scope,
3618 tf_state_scope_province,
3621 tf_country_scope_nation,
3622 tf_country_scope_province,
3623 tf_cultural_union_scope_pop,
3624 tf_capital_scope_province,
3625 tf_capital_scope_pop,
3627 tf_x_neighbor_province_scope_state,
3628 tf_x_provinces_in_variable_region_proper,
3638 auto base = state.value_modifiers[modifier];
3640 result += std::to_string(base.factor) +
" >r ";
3642 for(
uint32_t i = 0; i < base.segments_count; ++i) {
3643 auto seg = state.value_modifier_segments[base.first_segment_offset + i];
3645 result +=
test_trigger_generic(state.trigger_data.data() + state.trigger_data_indices[seg.condition.index() + 1], state);
3646 result +=
"1.0 swap " + std::to_string(seg.factor) +
" swap select r> * >r ";
3652 auto base = state.value_modifiers[modifier];
3654 result += std::to_string(base.base) +
" >r ";
3656 for(
uint32_t i = 0; i < base.segments_count; ++i) {
3657 auto seg = state.value_modifier_segments[base.first_segment_offset + i];
3659 result +=
test_trigger_generic(state.trigger_data.data() + state.trigger_data_indices[seg.condition.index() + 1], state);
3660 result +=
"0.0 swap " + std::to_string(seg.factor) +
" swap select r> + >r ";
3663 result +=
"r> " + std::to_string(base.factor) +
" * >r ";
3668 return test_trigger_generic(state.trigger_data.data() + state.trigger_data_indices[key.index() + 1], state);
3672#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
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