Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 92 additions & 1 deletion resources/resources.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,97 @@
{
"spells": {
"bless": "bless.png",
"bone_golem": "bone_golem.png",
"chains_of_dread": "chains_of_dread.png",
"concealment": "concealment.png",
"curse": "curse.png",
"eagle_eye": "eagle_eye.png",
"fire_golem": "fire_golem.png",
"living_armor": "living_armor.png",
"meteor_shower": "meteor_shower.png",
"plague": "plague.png",
"rust": "rust.png",
"skeletion": "skeletion.png",
"speed": "speed.png",
"stone_golem": "stone_golem.png",
"strength": "strength.png",
"true_healing": "true_healing.png",
"weaken": "weaken.png"
},
"sounds": {
"click": "click.wav"
"click": "click.wav",
"heal": "heal.wav",
"critical_attack": "critical_attack.wav",
"settlement": "settlement.wav",
"gold": "coin.wav",
"mana": "mana.wav",
"revive": "revive.wav",
"dismiss": "dismiss.wav",
"spellbook": "spellbook.mp3",
"prepare_magic": "prepare_magic.wav",
"exit": "exit.wav",
"use_orb": "use_orb.ogg",
"imp_hit": "imp_hit.ogg",
"goblin_hit": "goblin_hit.wav",
"raise_dead": "raise_dead.wav",
"zombie_hit": "zombie_hit.ogg",
"lizardman_hit": "lizardman_hit.wav",
"explosion": "explosion.wav",
"rust": "rust.wav",
"flask_shatter": "flask_shatter.wav",
"loot": "loot.wav",
"step": "step.wav",
"battle_win": "himwar.wav",
"new_day": "day.ogg",
"new_level": "level.wav",
"battle_round": "war.wav",
"sword_attack": "sword_attack.wav",
"axe_attack": "axe_attack.wav",
"staff_attack": "staff_attack.wav",
"bow_attack": "bow_attack.wav",
"spear_attack": "spear_attack.wav",
"dagger_attack": "dagger_attack.wav",
"club_attack": "club_attack.wav",
"block": "block.wav",
"miss": "miss.ogg",
"nosferat_attack": "nosferat_attack.mp3",
"lich_queen_attack": "lich_queen_attack.mp3",
"hum_hit": "hum_hit.wav",
"hum_death": "hum_death.ogg",
"goblin_death": "goblin_death.wav",
"skeleton_hit": "skeleton_hit.wav",
"skeleton_death": "skeleton_death.wav",
"orc_hit": "orc_hit.ogg",
"orc_death": "orc_death.ogg",
"wolf_hit": "wolf_hit.wav",
"wolf_death": "wolf_death.wav",
"wolf_attack": "wolf_attack.wav",
"bear_hit": "bear_hit.wav",
"bear_death": "bear_death.wav",
"bear_attack": "bear_attack.wav",
"spider_hit": "spider_hit.wav",
"spider_death": "spider_death.wav",
"spider_attack": "spider_attack.wav",
"ghost_hit": "spider_hit.wav",
"ghost_death": "spider_death.wav",
"ghost_attack": "spider_attack.wav",
"ghoul_attack": "ghoul_attack.ogg",
"ghoul_hit": "ghoul_hit.ogg",
"ghoul_death": "ghoul_death.ogg",
"hit": "step.wav",
"death": "step.wav",
"attack": "step.wav",
"dispell": "dispell.wav",
"plague": "plague.wav",
"invisibility": "invisibility.wav",
"speed": "speed.wav",
"learn": "learn.wav",
"drink": "use_elixir.ogg",
"imp_death": "imp_death.wav",
"zombie_death": "zombie_death.ogg",
"zombie_attack": "zombie_attack.ogg",
"lizardman_death": "lizardman_death.wav",
"boost": "boost.wav"
},
"music": {
"game": "soliloquy.mp3",
Expand Down
Binary file added resources/spells/bless.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/spells/bone_golem.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/spells/chains_of_dread.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/spells/concealment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/spells/curse.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/spells/eagle_eye.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/spells/fire_golem.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/spells/living_armor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/spells/meteor_shower.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/spells/plague.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/spells/rust.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/spells/skeletion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/spells/speed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/spells/stone_golem.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/spells/strength.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/spells/true_healing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/spells/weaken.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions sources/Game/Elinor.Battle.pas
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ procedure TBattle.CheckArtifactVampiricAttack(const AAtkParty,
LDamage := AAtkParty.Creature[AAtkPos].Damage.GetFullValue;
LValue := Percent(LDamage, TLeaderParty.LeaderVampiricAttackValue);
Sleep(50);
Game.MediaPlayer.PlaySound(mmHeal);
Game.MediaPlayer.PlaySound('heal');
AAtkParty.Heal(AAtkPos, EnsureRange(LValue, 5, 50));
LStr := TResources.RandomValue('battle.string', 'drain_life');
FBattleLog.Log.Add(Format(LStr, [TCreature.Character(AAtkCrEnum).Name[0],
Expand Down Expand Up @@ -172,7 +172,7 @@ procedure TBattle.DamageCreature(LAtkCrEnum: TCreatureEnum; AAtkParty: TParty;
if LIsCrit then
begin
FBattleLog.CriticalAttack;
Game.MediaPlayer.PlaySound(mmCriticalAttack);
Game.MediaPlayer.PlaySound('critical_attack');
Sleep(50);
end
else
Expand All @@ -181,7 +181,7 @@ procedure TBattle.DamageCreature(LAtkCrEnum: TCreatureEnum; AAtkParty: TParty;
atDrainLife:
begin
Sleep(50);
Game.MediaPlayer.PlaySound(mmHeal);
Game.MediaPlayer.PlaySound('heal');
AAtkParty.Heal(AAtkPos, EnsureRange(LDamage div 2, 5, 100));
end;
end;
Expand Down
131 changes: 66 additions & 65 deletions sources/Game/Elinor.Creatures.pas

Large diffs are not rendered by default.

30 changes: 7 additions & 23 deletions sources/Game/Elinor.MediaPlayer.pas
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,10 @@ TMediaPlayer = class(TObject)
property SoundVolume: ShortInt read GetSoundVolume write SetSoundVolume;
property MusicVolume: ShortInt read GetMusicVolume write SetMusicVolume;
property CurrentChannel: Integer read FCurrentChannel write FCurrentChannel;
function PlaySound(const FileName: string; F: Boolean = False)
: Boolean; overload;
function PlaySound(const MusicEnum: TMusicEnum; F: Boolean = False)
: Boolean; overload;
function PlayMusic(const FileName: string; F: Boolean = True)
: Boolean; overload;
function PlayMusic(const MusicEnum: TMusicEnum; F: Boolean = True)
function PlaySound(const AKey: string; F: Boolean = False)
: Boolean; overload;
function PlayMusic(const AKey: string; F: Boolean = True): Boolean;
overload;
procedure StopSound;
procedure StopMusic;
end;
Expand Down Expand Up @@ -92,29 +88,17 @@ function TMediaPlayer.IsPlayMusic: Boolean;
Result := BASS_ChannelIsActive(FChannel[MusicChannel]) = BASS_ACTIVE_PLAYING;
end;

function TMediaPlayer.PlayMusic(const FileName: string; F: Boolean): Boolean;
function TMediaPlayer.PlayMusic(const AKey: string; F: Boolean): Boolean;
begin
StopMusic;
CurrentChannel := MusicChannel;
Play(R.Music[FileName + '.mp3'], F, mtMusic);
Play(R.Musics[AKey], F, mtMusic);
CurrentChannel := SoundChannel;
end;

function TMediaPlayer.PlayMusic(const MusicEnum: TMusicEnum;
F: Boolean): Boolean;
begin
// PlayMusic(ResMusicPath[MusicEnum], F);
end;

function TMediaPlayer.PlaySound(const MusicEnum: TMusicEnum;
F: Boolean): Boolean;
begin
PlaySound(ResMusicPath[MusicEnum], F);
end;

function TMediaPlayer.PlaySound(const FileName: string; F: Boolean): Boolean;
function TMediaPlayer.PlaySound(const AKey: string; F: Boolean): Boolean;
begin
Play(FileName, F, mtSound);
Play(R.Sounds[AKey], F, mtSound);
end;

function TMediaPlayer.Play(const FileName: string; F: Boolean;
Expand Down
Loading