Merge branch 'master' of https://github.com/wesnoth/wesnoth
|
@ -178,6 +178,7 @@ Version 1.13.0-dev:
|
|||
between random and non-random music play (bug #19653)
|
||||
* Fixed a bug that prevented [animate_unit] from displaying death or victory
|
||||
animations for those units that filter them based on weapon (eg. Wose)
|
||||
* New WML tags: [full_heal] and [put_to_recall_list].
|
||||
* Miscellaneous and bug fixes:
|
||||
* replace 'fight_on_without_leader'=yes/no with defeat_condition=no_leader/
|
||||
no_units/always/never which allows the wml developer to decide when a side
|
||||
|
|
After Width: | Height: | Size: 2 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.2 KiB |
|
@ -593,6 +593,7 @@
|
|||
|
||||
{VARIABLE factor $unit.max_experience}
|
||||
{VARIABLE_OP factor multiply 0.5}
|
||||
{VARIABLE_OP factor round 0}
|
||||
{RANDOM $factor..$unit.max_experience}
|
||||
{VARIABLE unit.experience $random}
|
||||
[unstore_unit]
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
id=Desert Archer
|
||||
name= _ "Desert Archer"
|
||||
race=elf
|
||||
gender=male
|
||||
gender=male,female
|
||||
image=units/elves-desert/archer.png
|
||||
{MAGENTA_IS_THE_TEAM_COLOR}
|
||||
hitpoints=29
|
||||
|
|
|
@ -1,17 +1,18 @@
|
|||
#textdomain wesnoth-utbs
|
||||
|
||||
[unit_type]
|
||||
id=Skeleton Rider
|
||||
name= _ "Skeleton Rider"
|
||||
race=undead
|
||||
image=units/undead/skeletonrider.png
|
||||
image="units/undead-skeletal/rider.png"
|
||||
{MAGENTA_IS_THE_TEAM_COLOR}
|
||||
{DEFENSE_ANIM "units/undead-skeletal/rider-defend.png" "units/undead-skeletal/rider.png" {SOUND_LIST:SKELETON_HIT} }
|
||||
[movement_anim]
|
||||
start_time=0
|
||||
[frame]
|
||||
begin=0
|
||||
end=150
|
||||
image="units/undead/skeletonrider-moving.png"
|
||||
image="units/undead-skeletal/rider-moving.png:150"
|
||||
[/frame]
|
||||
[/movement_anim]
|
||||
{DEFENSE_ANIM "units/undead/skeletonrider-defend.png" units/undead/skeletonrider.png {SOUND_LIST:SKELETON_HIT} }
|
||||
hitpoints=36
|
||||
movement_type=mounted
|
||||
movement=7
|
||||
|
@ -48,10 +49,24 @@
|
|||
[filter_attack]
|
||||
name=axe
|
||||
[/filter_attack]
|
||||
start_time=-100
|
||||
|
||||
start_time=-250
|
||||
horse_sound_start_time=-250
|
||||
|
||||
[frame]
|
||||
image=units/undead/skeletonrider-attack[1~2].png:100
|
||||
image="units/undead-skeletal/rider-moving.png:150"
|
||||
[/frame]
|
||||
{SOUND:HIT_AND_MISS axe.ogg {SOUND_LIST:MISS} -200}
|
||||
[frame]
|
||||
image="units/undead-skeletal/rider-attack.png:200"
|
||||
[/frame]
|
||||
[frame]
|
||||
image="units/undead-skeletal/rider-moving.png:50"
|
||||
[/frame]
|
||||
|
||||
[horse_sound_frame]
|
||||
sound=horse-canter.wav
|
||||
[/horse_sound_frame]
|
||||
|
||||
{SOUND:HIT_AND_MISS axe.ogg {SOUND_LIST:MISS} -75}
|
||||
[/attack_anim]
|
||||
[/unit_type]
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
name=desert_float
|
||||
flies=true
|
||||
[movement_costs]
|
||||
deep_water=100
|
||||
deep_water={UNREACHABLE}
|
||||
shallow_water=1
|
||||
reef=1
|
||||
swamp_water=1
|
||||
|
|
|
@ -365,26 +365,9 @@
|
|||
#enddef
|
||||
|
||||
#define FULL_HEAL FILTER
|
||||
# This heals the specified unit(s) to full health.
|
||||
[store_unit]
|
||||
[filter]
|
||||
{FILTER}
|
||||
[/filter]
|
||||
variable=FULL_HEAL_temp
|
||||
[/store_unit]
|
||||
|
||||
{FOREACH FULL_HEAL_temp FULL_HEAL_i}
|
||||
[set_variable]
|
||||
name=FULL_HEAL_temp[$FULL_HEAL_i].hitpoints
|
||||
value=$FULL_HEAL_temp[$FULL_HEAL_i].max_hitpoints
|
||||
[/set_variable]
|
||||
[unstore_unit]
|
||||
find_vacant=no
|
||||
variable=FULL_HEAL_temp[$FULL_HEAL_i]
|
||||
[/unstore_unit]
|
||||
{NEXT FULL_HEAL_i}
|
||||
|
||||
{CLEAR_VARIABLE FULL_HEAL_temp,FULL_HEAL_i}
|
||||
[full_heal]
|
||||
{FILTER}
|
||||
[/full_heal]
|
||||
#enddef
|
||||
|
||||
#define PUT_TO_RECALL_LIST FILTER
|
||||
|
@ -405,26 +388,9 @@
|
|||
#!
|
||||
#! {PUT_TO_RECALL_LIST x,y=20,38}
|
||||
#! [/event]
|
||||
[store_unit]
|
||||
[filter]
|
||||
{FILTER}
|
||||
[/filter]
|
||||
|
||||
variable=PUT_TO_RECALL_LIST_temp
|
||||
kill=yes
|
||||
[/store_unit]
|
||||
|
||||
{FOREACH PUT_TO_RECALL_LIST_temp PUT_TO_RECALL_LIST_i}
|
||||
{VARIABLE PUT_TO_RECALL_LIST_temp[$PUT_TO_RECALL_LIST_i].x "recall"}
|
||||
{VARIABLE PUT_TO_RECALL_LIST_temp[$PUT_TO_RECALL_LIST_i].y "recall"}
|
||||
|
||||
[unstore_unit]
|
||||
variable=PUT_TO_RECALL_LIST_temp[$PUT_TO_RECALL_LIST_i]
|
||||
find_vacant=no
|
||||
[/unstore_unit]
|
||||
{NEXT PUT_TO_RECALL_LIST_i}
|
||||
|
||||
{CLEAR_VARIABLE PUT_TO_RECALL_LIST_temp,PUT_TO_RECALL_LIST_i}
|
||||
[put_to_recall_list]
|
||||
{FILTER}
|
||||
[/put_to_recall_list]
|
||||
#enddef
|
||||
|
||||
# FIXME: Documentation for these is needed.
|
||||
|
|
|
@ -1275,3 +1275,36 @@ function wml_actions.store_villages( cfg )
|
|||
)
|
||||
end
|
||||
end
|
||||
|
||||
function wml_actions.put_to_recall_list(cfg)
|
||||
local units = wesnoth.get_units(cfg)
|
||||
|
||||
for i, unit in ipairs(units) do
|
||||
if cfg.heal then
|
||||
unit.hitpoints = unit.max_hitpoints
|
||||
unit.moves = unit.max_moves
|
||||
unit.attacks_left = unit.max_attacks
|
||||
unit.status.poisoned = false
|
||||
unit.status.slowed = false
|
||||
end
|
||||
wesnoth.put_recall_unit(unit, unit.side)
|
||||
wesnoth.put_unit(unit.x, unit.y)
|
||||
end
|
||||
end
|
||||
|
||||
function wml_actions.full_heal(cfg)
|
||||
local units = wesnoth.get_units(cfg)
|
||||
|
||||
for i, unit in ipairs(units) do
|
||||
if (not unit.status.unhealable) or cfg.ignore_status then
|
||||
unit.hitpoints = unit.max_hitpoints
|
||||
if cfg.cures then
|
||||
unit.status.poisoned = false
|
||||
unit.status.slowed = false
|
||||
end
|
||||
if cfg.animate then
|
||||
wesnoth.fire( "animate_unit", { flag = "healed" , with_bars = "yes" , { "filter" , { id = unit.id } } })
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -16922,8 +16922,8 @@ msgid ""
|
|||
"he stopped. He motioned us to be very quiet and we crept forward; all I "
|
||||
"could hear was the soft patter of feet and my heavy breathing. Even that "
|
||||
"little noise seemed to echo off the cramped walls of our rough-hewn passage. "
|
||||
"I was suddenly aware of the sheer mass of rock and earth above us and for "
|
||||
"a moment I despaired of ever seeing the sun again. Then I grabbed my sword "
|
||||
"I was suddenly aware of the sheer mass of rock and earth above us and for a "
|
||||
"moment I despaired of ever seeing the sun again. Then I grabbed my sword "
|
||||
"with fresh determination and vowed to see this mission through."
|
||||
msgstr ""
|
||||
"Capitolo 6: Il troll Zurg ci condusse attraverso un labirinto di passaggi "
|
||||
|
|
2712
po/wesnoth/it.po
|
@ -1082,6 +1082,45 @@ static int intf_have_file(lua_State *L)
|
|||
return 1;
|
||||
}
|
||||
|
||||
class lua_filestream
|
||||
{
|
||||
public:
|
||||
lua_filestream(const std::string& fname)
|
||||
: pistream_(filesystem::istream_file(fname))
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static const char * lua_read_data(lua_State * /*L*/, void *data, size_t *size)
|
||||
{
|
||||
lua_filestream* lfs = (lua_filestream*) data;
|
||||
|
||||
//int startpos = lfs->pistream_->tellg();
|
||||
lfs->pistream_->read(lfs->buff_, LUAL_BUFFERSIZE);
|
||||
//int newpos = lfs->pistream_->tellg();
|
||||
*size = lfs->pistream_->gcount();
|
||||
#if 0
|
||||
ERR_LUA << "read bytes from " << startpos << " to " << newpos << " in total " *size << " from steam\n";
|
||||
ERR_LUA << "streamstate beeing "
|
||||
<< " goodbit:" << lfs->pistream_->good()
|
||||
<< " endoffile:" << lfs->pistream_->eof()
|
||||
<< " badbit:" << lfs->pistream_->bad()
|
||||
<< " failbit:" << lfs->pistream_->fail() << "\n";
|
||||
#endif
|
||||
return lfs->buff_;
|
||||
}
|
||||
|
||||
static int lua_loadfile(lua_State *L, const std::string& fname)
|
||||
{
|
||||
lua_filestream lfs(fname);
|
||||
LOG_LUA << "starting to read from " << fname << "\n";
|
||||
return lua_load(L, &lua_filestream::lua_read_data, &lfs, fname.c_str(), NULL);
|
||||
}
|
||||
private:
|
||||
char buff_[LUAL_BUFFERSIZE];
|
||||
boost::scoped_ptr<std::istream> pistream_;
|
||||
};
|
||||
|
||||
/**
|
||||
* Loads and executes a Lua file.
|
||||
* - Arg 1: string containing the file name.
|
||||
|
@ -1095,8 +1134,22 @@ static int intf_dofile(lua_State *L)
|
|||
return luaL_argerror(L, 1, "file not found");
|
||||
|
||||
lua_settop(L, 0);
|
||||
|
||||
#if 1
|
||||
try
|
||||
{
|
||||
if(lua_filestream::lua_loadfile(L, p))
|
||||
return lua_error(L);
|
||||
}
|
||||
catch(const std::exception & ex)
|
||||
{
|
||||
luaL_argerror(L, 1, ex.what());
|
||||
}
|
||||
#else
|
||||
//oldcode to be deleted if newcode works
|
||||
if (luaL_loadfile(L, p.c_str()))
|
||||
return lua_error(L);
|
||||
#endif
|
||||
|
||||
lua_call(L, 0, LUA_MULTRET);
|
||||
return lua_gettop(L);
|
||||
|
|