mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-18 13:03:27 +00:00
added new attack sounds for some units
This commit is contained in:
parent
f2d6c80910
commit
e72286e28b
@ -24,6 +24,10 @@ get_hit_sound=groan.wav
|
||||
range=short
|
||||
damage=7
|
||||
number=2
|
||||
[sound]
|
||||
time=-100
|
||||
sound=staff.wav
|
||||
[/sound]
|
||||
[/attack]
|
||||
[attack]
|
||||
name=fireball
|
||||
|
@ -40,5 +40,9 @@ get_hit_sound=groan.wav
|
||||
image=missiledagger-n.png
|
||||
image_diagonal=missiledagger-ne.png
|
||||
[/missile_frame]
|
||||
[sound]
|
||||
time=-100
|
||||
sound=knife.wav
|
||||
[/sound]
|
||||
[/attack]
|
||||
[/unit]
|
||||
|
@ -30,7 +30,7 @@ get_hit_sound=groan.wav
|
||||
number=4
|
||||
[/attack]
|
||||
[attack]
|
||||
name=throwing knife
|
||||
name=knife
|
||||
type=blade
|
||||
range=long
|
||||
damage=6
|
||||
@ -41,5 +41,9 @@ get_hit_sound=groan.wav
|
||||
image=missiledagger-n.png
|
||||
image_diagonal=missiledagger-ne.png
|
||||
[/missile_frame]
|
||||
[sound]
|
||||
time=-100
|
||||
sound=knife.wav
|
||||
[/sound]
|
||||
[/attack]
|
||||
[/unit]
|
||||
|
@ -23,6 +23,10 @@ unit_description="A once-great mage, the Elder Mage still holds much of his powe
|
||||
range=short
|
||||
damage=8
|
||||
number=2
|
||||
[sound]
|
||||
time=-100
|
||||
sound=staff.wav
|
||||
[/sound]
|
||||
[/attack]
|
||||
[attack]
|
||||
name=lightning
|
||||
|
@ -21,6 +21,10 @@ get_hit_sound=groan.wav
|
||||
damage=4
|
||||
number=2
|
||||
range=short
|
||||
[sound]
|
||||
time=-100
|
||||
sound=staff.wav
|
||||
[/sound]
|
||||
[/attack]
|
||||
|
||||
[attack]
|
||||
|
@ -29,6 +29,10 @@ get_hit_sound=groan.wav
|
||||
end=100
|
||||
image=elvish-shaman-attack.png
|
||||
[/frame]
|
||||
[sound]
|
||||
time=-100
|
||||
sound=staff.wav
|
||||
[/sound]
|
||||
[/attack]
|
||||
|
||||
[attack]
|
||||
|
@ -25,6 +25,10 @@ get_hit_sound=groan.wav
|
||||
end=100
|
||||
image=undead-necromancer-attack.png
|
||||
[/frame]
|
||||
[sound]
|
||||
time=-100
|
||||
sound=staff.wav
|
||||
[/sound]
|
||||
[/attack]
|
||||
[attack]
|
||||
name=magic
|
||||
|
@ -43,5 +43,9 @@ get_hit_sound=groan.wav
|
||||
end=0
|
||||
image=web.png
|
||||
[/missile_frame]
|
||||
[sound]
|
||||
time=-100
|
||||
sound=net.wav
|
||||
[/sound]
|
||||
[/attack]
|
||||
[/unit]
|
||||
|
@ -23,6 +23,10 @@ get_hit_sound=groan.wav
|
||||
range=short
|
||||
damage=10
|
||||
number=2
|
||||
[sound]
|
||||
time=-100
|
||||
sound=staff.wav
|
||||
[/sound]
|
||||
[/attack]
|
||||
[attack]
|
||||
name=fireball
|
||||
|
@ -19,5 +19,9 @@ usage=fighter
|
||||
range=short
|
||||
damage=12
|
||||
number=2
|
||||
[sound]
|
||||
time=-100
|
||||
sound=mace.wav
|
||||
[/sound]
|
||||
[/attack]
|
||||
[/unit]
|
||||
|
@ -25,6 +25,10 @@ get_hit_sound=groan.wav
|
||||
end=100
|
||||
image=undead-necromancer-attack.png
|
||||
[/frame]
|
||||
[sound]
|
||||
time=-100
|
||||
sound=staff.wav
|
||||
[/sound]
|
||||
[/attack]
|
||||
[attack]
|
||||
name=magic
|
||||
|
@ -35,5 +35,9 @@ get_hit_sound=groan.wav
|
||||
image=missiledagger-n.png
|
||||
image_diagonal=missiledagger-ne.png
|
||||
[/missile_frame]
|
||||
[sound]
|
||||
time=-100
|
||||
sound=knife.wav
|
||||
[/sound]
|
||||
[/attack]
|
||||
[/unit]
|
||||
|
@ -19,5 +19,9 @@ usage=fighter
|
||||
range=short
|
||||
damage=20
|
||||
number=2
|
||||
[sound]
|
||||
time=-100
|
||||
sound=mace.wav
|
||||
[/sound]
|
||||
[/attack]
|
||||
[/unit]
|
||||
|
@ -32,6 +32,10 @@ get_hit_sound=groan.wav
|
||||
range=long
|
||||
damage=7
|
||||
number=1
|
||||
[sound]
|
||||
time=-100
|
||||
sound=spear.wav
|
||||
[/sound]
|
||||
[frame]
|
||||
begin=-100
|
||||
end=100
|
||||
|
@ -25,5 +25,9 @@ get_hit_sound=groan.wav
|
||||
end=100
|
||||
image=troll-warrior-attack.png
|
||||
[/frame]
|
||||
[sound]
|
||||
time=-100
|
||||
sound=mace.wav
|
||||
[/sound]
|
||||
[/attack]
|
||||
[/unit]
|
||||
|
BIN
sounds/knife.wav
Normal file
BIN
sounds/knife.wav
Normal file
Binary file not shown.
BIN
sounds/mace.wav
Normal file
BIN
sounds/mace.wav
Normal file
Binary file not shown.
BIN
sounds/net.wav
Normal file
BIN
sounds/net.wav
Normal file
Binary file not shown.
BIN
sounds/spear.wav
Normal file
BIN
sounds/spear.wav
Normal file
Binary file not shown.
BIN
sounds/staff.wav
Normal file
BIN
sounds/staff.wav
Normal file
Binary file not shown.
@ -22,6 +22,7 @@
|
||||
#include "config.hpp"
|
||||
#include "filesystem.hpp"
|
||||
#include "game_config.hpp"
|
||||
#include "game_events.hpp"
|
||||
#include "log.hpp"
|
||||
#include "scoped_resource.hpp"
|
||||
|
||||
@ -642,6 +643,11 @@ const std::string& config::operator[](const std::string& key) const
|
||||
{
|
||||
const string_map::const_iterator i = values.find(key);
|
||||
if(i != values.end()) {
|
||||
//see if the value is a variable
|
||||
if(i->second[0] == '$') {
|
||||
return game_events::get_variable(std::string(i->second.begin()+1,i->second.end()));
|
||||
}
|
||||
|
||||
return i->second;
|
||||
} else {
|
||||
static const std::string empty_string;
|
||||
|
@ -926,8 +926,8 @@ void display::draw_tile(int x, int y, SDL_Surface* unit_image_override,
|
||||
image_type = image::GREYED;
|
||||
}
|
||||
|
||||
if(loc == mouseoverHex_ || loc == selectedHex_ &&
|
||||
units_.count(gamemap::location(x,y)) == 1) {
|
||||
if(loc == mouseoverHex_ && map_.on_board(mouseoverHex_) ||
|
||||
loc == selectedHex_ && units_.count(gamemap::location(x,y)) == 1) {
|
||||
image_type = image::BRIGHTENED;
|
||||
}
|
||||
|
||||
|
@ -900,6 +900,20 @@ bool process_event(event_handler& handler, const queued_event& ev)
|
||||
|
||||
namespace game_events {
|
||||
|
||||
const std::string& get_variable(const std::string& key)
|
||||
{
|
||||
static const std::string empty_string;
|
||||
if(state_of_game != NULL) {
|
||||
const string_map::const_iterator i = state_of_game->variables.find(key);
|
||||
if(i != state_of_game->variables.end())
|
||||
return i->second;
|
||||
else
|
||||
return empty_string;
|
||||
} else {
|
||||
return empty_string;
|
||||
}
|
||||
}
|
||||
|
||||
manager::manager(config& cfg, display& gui_, gamemap& map_,
|
||||
std::map<gamemap::location,unit>& units_,
|
||||
std::vector<team>& teams_,
|
||||
|
@ -34,6 +34,8 @@
|
||||
namespace game_events
|
||||
{
|
||||
|
||||
const std::string& get_variable(const std::string& varname);
|
||||
|
||||
//the game event manager loads the scenario configuration object, and
|
||||
//ensures that events are handled according to the scenario configuration
|
||||
//for its lifetime.
|
||||
|
@ -612,7 +612,7 @@ void turn_info::show_menu()
|
||||
}
|
||||
|
||||
static const std::string create_unit_debug = "Create Unit (debug)";
|
||||
if(game_config::debug) {
|
||||
if(game_config::debug && map_.on_board(last_hex_)) {
|
||||
menu.push_back(create_unit_debug);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user