876 peffect =
effect_new(EFT_ACTION_SUCCESS_MOVE_COST,
885 peffect =
effect_new(EFT_ACTION_SUCCESS_MOVE_COST,
894 peffect =
effect_new(EFT_ACTION_SUCCESS_MOVE_COST,
899 TRUE,
"Expel Unit"));
903 peffect =
effect_new(EFT_ACTION_SUCCESS_MOVE_COST,
908 TRUE,
"Capture Units"));
912 peffect =
effect_new(EFT_ACTION_SUCCESS_MOVE_COST,
917 TRUE,
"Establish Embassy"));
921 peffect =
effect_new(EFT_ACTION_SUCCESS_MOVE_COST,
926 TRUE,
"Investigate City"));
930 peffect =
effect_new(EFT_ACTION_SUCCESS_TARGET_MOVE_COST,
935 TRUE,
"Expel Unit"));
939 peffect =
effect_new(EFT_ACTION_SUCCESS_MOVE_COST,
949 if (paction->actor_consuming_always) {
954 peffect =
effect_new(EFT_ACTION_SUCCESS_MOVE_COST,
977 peffect =
effect_new(EFT_ACTION_SUCCESS_MOVE_COST,
994 if (putype->rscompat_cache.paratroopers_mr_sub == 0) {
1008 peffect =
effect_new(EFT_FORTIFY_DEFENSE_BONUS, 50, NULL);
1014 FALSE,
"Fortified"));
1017 peffect =
effect_new(EFT_FORTIFY_DEFENSE_BONUS, 50, NULL);
1024 FALSE,
"Fortified"));
1027 FALSE,
"CanFortify"));
1029 FALSE,
"Cant_Fortify"));
1037 peffect =
effect_new(EFT_UNIT_SHIELD_VALUE_PCT, -50, NULL);
1039 FALSE,
"Recycle Unit"));
1043 peffect =
effect_new(EFT_UNIT_SHIELD_VALUE_PCT, -50, NULL);
1045 FALSE,
"Upgrade Unit"));
1049 peffect =
effect_new(EFT_HEAL_UNIT_PCT, -75, NULL);
1051 FALSE,
"Heal Unit"));
1055 peffect =
effect_new(EFT_MIN_HP_PCT, 33, NULL);
1060 peffect =
effect_new(EFT_HP_REGEN_2, 10, NULL);
1063 if (pclass->hp_loss_pct) {
1072 peffect =
effect_new(EFT_HP_REGEN_2, 10, NULL);
1074 FALSE,
"Fortified"));
1078 log_normal(
_(
"Preparing user effects to help you port edit.unit_move()"
1079 " and edit.unit_teleport() Lua calls."));
1080 log_normal(
_(
"It is safe to delete the effects if you don't use"
1081 " unit_move() or unit_teleport() or if you want to fill"
1082 " in the new parameters with your own values."));
1083 log_normal(
_(
"Use effects.unit_bonus() and effects.unit_vs_tile_bonus()"
1084 " to get the value of the user effects"
1085 " if you wish to use them."));
1088 log_normal(
_(
"User_Effect_1 is now if a unit can conquer a city."));
1089 peffect =
effect_new(EFT_USER_EFFECT_1, 1, NULL);
1109 log_normal(
_(
"User_Effect_2 is now if a unit can conquer an extra."));
1110 peffect =
effect_new(EFT_USER_EFFECT_2, 1, NULL);
1115 peffect =
effect_new(EFT_USER_EFFECT_2, 1, NULL);
1121 log_normal(
_(
"User_Effect_3 is now if a unit can enter a hut."));
1122 peffect =
effect_new(EFT_USER_EFFECT_3, 1, NULL);
1131 log_normal(
_(
"User_Effect_4 is now if a unit can frighten a hut."));
1132 peffect =
effect_new(EFT_USER_EFFECT_4, 1, NULL);
1165 enabler->
action = ACTION_PILLAGE;
1168 requirement_vector_append(&enabler->
actor_reqs, e_req);
1172 enabler->
action = ACTION_CLEAN_FALLOUT;
1175 requirement_vector_append(&enabler->
actor_reqs, e_req);
1179 enabler->
action = ACTION_CLEAN_POLLUTION;
1182 requirement_vector_append(&enabler->
actor_reqs, e_req);
1186 enabler->
action = ACTION_FORTIFY;
1189 requirement_vector_append(&enabler->
actor_reqs, e_req);
1192 requirement_vector_append(&enabler->
actor_reqs, e_req);
1195 requirement_vector_append(&enabler->
actor_reqs, e_req);
1199 enabler->
action = ACTION_FORTIFY;
1202 requirement_vector_append(&enabler->
actor_reqs, e_req);
1205 requirement_vector_append(&enabler->
actor_reqs, e_req);
1208 requirement_vector_append(&enabler->
actor_reqs, e_req);
1212 enabler->
action = ACTION_ROAD;
1215 requirement_vector_append(&enabler->
actor_reqs, e_req);
1219 enabler->
action = ACTION_CONVERT;
1223 enabler->
action = ACTION_BASE;
1226 requirement_vector_append(&enabler->
actor_reqs, e_req);
1230 enabler->
action = ACTION_TRANSPORT_ALIGHT;
1234 enabler->
action = ACTION_TRANSPORT_BOARD;
1238 enabler->
action = ACTION_TRANSPORT_EMBARK;
1242 enabler->
action = ACTION_TRANSPORT_UNLOAD;
1250 enabler->
action = ACTION_UNIT_MOVE;
1253 requirement_vector_append(&enabler->
actor_reqs, e_req);
1257 requirement_vector_append(&enabler->
actor_reqs, e_req);
1265 if (ae->action == ACTION_ATTACK) {
1270 requirement_vector_append(&ae->actor_reqs,
1276 enabler->
action = ACTION_SUICIDE_ATTACK;
1277 requirement_vector_append(&enabler->
actor_reqs,
1288 if (ae->action == ACTION_NUKE) {
1299 city->action = ACTION_NUKE_CITY;
1303 units->
action = ACTION_NUKE_UNITS;
1308 requirement_vector_append(&
city->actor_reqs,
1312 requirement_vector_append(&units->
actor_reqs,
1321 requirement_vector_append(&
city->actor_reqs,
1326 requirement_vector_append(&units->
actor_reqs,
1346 if (ae->action == ACTION_SPY_TARGETED_SABOTAGE_CITY) {
1350 enabler->
action = ACTION_SPY_SABOTAGE_CITY_PRODUCTION;
1358 if (ae->action == ACTION_SPY_TARGETED_SABOTAGE_CITY_ESC) {
1362 enabler->
action = ACTION_SPY_SABOTAGE_CITY_PRODUCTION_ESC;
1372 bool generic_in_use =
FALSE;
1373 struct action_enabler_list *ae_custom = action_enabler_list_new();
1379 &(ae->actor_reqs))) {
1385 if (preq->source.kind == VUT_MINMOVES) {
1386 if (!preq->present) {
1389 if (preq->source.value.minmoves
1390 < putype->rscompat_cache.paratroopers_mr_req) {
1398 if (putype->rscompat_cache.paratroopers_mr_req > 0) {
1408 requirement_vector_append(&enabler->
actor_reqs, e_req);
1414 putype->rscompat_cache
1415 .paratroopers_mr_req);
1416 requirement_vector_append(&enabler->
actor_reqs, e_req);
1418 action_enabler_list_append(ae_custom, enabler);
1420 log_debug(
"paratroopers_mr_req upgrade: %s uses custom enabler",
1425 generic_in_use =
TRUE;
1427 log_debug(
"paratroopers_mr_req upgrade: %s uses generic enabler",
1432 if (!generic_in_use) {
1443 action_enabler_list_destroy(ae_custom);
1450 for (i = 0; i < CLAUSE_COUNT; i++) {
1480 auto_perf->
alternatives[3] = ACTION_TRANSPORT_DISEMBARK1;
1481 auto_perf->
alternatives[4] = ACTION_TRANSPORT_DISEMBARK2;
1482 auto_perf->
alternatives[5] = ACTION_TRANSPORT_DISEMBARK3;
1483 auto_perf->
alternatives[6] = ACTION_TRANSPORT_DISEMBARK4;
1507 auto_perf->
alternatives[4] = ACTION_TRANSPORT_DISEMBARK1;
1508 auto_perf->
alternatives[5] = ACTION_TRANSPORT_DISEMBARK2;
1509 auto_perf->
alternatives[6] = ACTION_TRANSPORT_DISEMBARK3;
1510 auto_perf->
alternatives[7] = ACTION_TRANSPORT_DISEMBARK4;
1555 ACTRES_TRANSPORT_EMBARK);
1557 ACTRES_CONQUER_EXTRAS);
1561 ACTRES_HUT_FRIGHTEN);
1579 ACTRES_SPY_SABOTAGE_CITY_PRODUCTION)
1597 ACTION_PARADROP_ENTER_CONQUER),
1598 "Enter Hut Contested %s");
1604 ACTION_PARADROP_FRIGHTEN_CONQUER),
1605 "Frighten Hut Contested %s");
1614 edit->action = para_action->id;
1617 requirement_vector_append(&
edit->actor_reqs, e_req);
1621 requirement_vector_append(&
edit->target_reqs, e_req);
1625 UCF_CAN_OCCUPY_CITY);
1626 requirement_vector_append(&
edit->actor_reqs, e_req);
1630 requirement_vector_append(&
edit->actor_reqs, e_req);
1635 edit->action = para_action->id;
1638 requirement_vector_append(&
edit->actor_reqs, e_req);
1642 requirement_vector_append(&
edit->target_reqs, e_req);
1646 requirement_vector_append(&
edit->target_reqs, e_req);
1657 edit->action = para_action->id;
1661 requirement_vector_append(&
edit->target_reqs, e_req);
1665 requirement_vector_append(&
edit->target_reqs, e_req);
1668 requirement_vector_append(&
edit->target_reqs, e_req);
1674 if (para_action->id == ACTION_PARADROP) {
1688 requirement_vector_append(&ae->target_reqs, e_req);
1694 requirement_vector_append(&ae->actor_reqs, e_req);
1699 edit->action = para_action->id;
1708 if (ae->action != ACTION_PARADROP
1709 && ae->action != ACTION_PARADROP_CONQUER) {
1716 requirement_vector_append(&ae->actor_reqs, e_req);
1721 enum unit_class_flag_id nothing
1725 if (uc->rscompat_cache_from_3_0.hut_behavior ==
HUT_NOTHING) {
1726 if (unit_class_flag_id_is_valid(nothing)) {
1727 BV_SET(uc->flags, nothing);
1729 }
else if (uc->rscompat_cache_from_3_0.hut_behavior ==
HUT_FRIGHTEN) {
1730 BV_SET(uc->flags, UCF_HUT_FRIGHTEN);