disable magic resistant to prevent 2% intermittent test.

This commit is contained in:
Enno Rehling 2019-10-05 20:59:55 +02:00
parent b4f3120658
commit f02c4cbaeb
3 changed files with 11 additions and 1 deletions

View file

@ -9,6 +9,7 @@ function setup()
eressea.settings.set("NewbieImmunity", "0")
eressea.settings.set("rules.food.flags", "4")
eressea.settings.set("rules.peasants.growth.factor", "0")
eressea.settings.set("magic.resist.enable", "0")
eressea.settings.set("magic.fumble.enable", "0")
eressea.settings.set("magic.regeneration.enable", "0")
end
@ -258,5 +259,6 @@ function test_astral_disruption()
u:add_spell("astral_disruption")
u:add_order('ZAUBERE STUFE 1 "Stoere Astrale Integritaet"')
process_orders()
assert_not_nil(r2:get_curse("astralblock"))
assert_equal(r, uh.region)
end

View file

@ -1152,6 +1152,14 @@ target_resists_magic(unit * magician, void *obj, int objtyp, int t_bonus)
{
variant v02p, v98p, prob = frac_make(t_bonus, 100);
attrib *a = NULL;
static bool never_resist;
static int config;
if (config_changed(&config)) {
never_resist = config_get_int("magic.resist.enable", 1) == 0;
}
if (never_resist) {
return false;
}
if (magician == NULL || obj == NULL) {
return true;

View file

@ -5546,7 +5546,7 @@ static void cb_disrupt_astral(region *r2, void *cbdata) {
region *rtargets[MAX_SCHEMES];
region *r = co_get_region(co);
unit *caster = co_get_caster(co);
int duration = (int)(co->force / 3) + 1;
int duration = (int)(co->force / 3) + 2;
if (is_cursed(r2->attribs, &ct_astralblock)) {
return;