christmas mege conflict, why?

This commit is contained in:
Enno Rehling 2018-01-21 09:54:32 +01:00
commit 74c48f7914
4 changed files with 24 additions and 17 deletions

View File

@ -11,7 +11,7 @@ fi
cd $ERESSEA/game-$GAME
echo "running turn $TURN, game $GAME"
$ERESSEA/server/bin/eressea -v3 -t $TURN run-turn.lua
$ERESSEA/server/bin/eressea -t $TURN run-turn.lua
mkdir -p log
ln -f eressea.log log/eressea.log.$TURN

View File

@ -34,6 +34,18 @@
pulled by 8 young dragons flies through the stary night and presents
your faction with a $resource($item,1).</text>
</message>
<message name="santa_m" section="events">
<type>
<arg name="item" type="resource"/>
</type>
<text locale="de">'Ho ho ho!' Ein dicker Gnom fliegt auf einem von
8 Jungdrachen gezogenen Schlitten durch die Nacht und vermacht Deiner
Partei einen $resource($item,1). (Um diesen Gegenstand einer Einheit zu geben, gib
ihr den Befehl 'BEANSPRUCHE 1 $resource($item,1)').</text>
<text locale="en">'Ho ho ho!' A fat little gnome Gnom on a sled
pulled by 8 young dragons flies through the stary night and presents
your faction with a $resource($item,1).</text>
</message>
<message name="target_region_invalid">
<type>

View File

@ -2,16 +2,15 @@ if not config.xmas or config.xmas==0 then return nil end
local gifts = {
e2 = {
{ year = 2017, turn = 1057, item = 'snowglobe', msg='santa_f' },
{ year = 2015, turn = 959, item = 'snowglobe', msg='santa_f' },
{ year = 2009, turn = 624, item = 'xmastree' },
{ year = 2006, turn = 468, key = 'xm06', item = 'snowman' },
{ year = 2005, turn = 416, key = 'xm05', item = 'stardust' },
{ year = 2004, turn = 364, key = 'xm04', item = 'speedsail' }
[1057] = { year = 2017, item = 'snowglobe', msg='santa_f' },
[959] = { year = 2015, item = 'snowglobe', msg='santa_f' },
[624] = { year = 2009, item = 'xmastree', msg='santa_m' },
[468] = { year = 2006, item = 'snowman', msg='santa_m' },
[416] = { year = 2005, item = 'stardust' },
[364] = { year = 2004, item = 'speedsail' }
},
e3 = {
-- { year = 2015, turn = 338, item = 'snowglobe' },
{ year = 2009, turn = 26, key = 'xm09', item = 'xmastree' }
[26] = { year = 2009, item = 'xmastree' }
}
}
@ -38,13 +37,9 @@ function self.init()
local turn = get_turn()
local tbl = gifts[config.rules]
if tbl then
for _, gift in ipairs(tbl) do
if turn == gift.turn then
give_gifts(gift)
elseif gift.key and not get_key(gift.key) then
give_gifts(gift)
set_key(gift.key)
end
gift = tbl[turn]
if gift then
give_gifts(gift)
end
end
end

View File

@ -1063,7 +1063,7 @@ void clone_men(const unit * u, unit * dst, int n)
transfer_curse(u, dst, n);
}
set_number(dst, dst->number + n);
dst->hp += (long)u->hp * n / u->number;
dst->hp += (long long)u->hp * n / u->number;
assert(dst->hp >= dst->number);
/* TODO: Das ist schnarchlahm! und gehoert nicht hierhin */
a = a_find(dst->attribs, &at_effect);