Fixed primitives, improved sound tracks management, now it's possbile to add a custom tracks for Shop section (Track2.mp3), Option window (Track3.mp3) and Awards section (Track4.mp3) and it's also possible to add two subfolders "MainMenu" and "Battlefield" within "suound" folder where it's possbile to add twenty custom songs ("TrackMenuXX.mp3" and "TrackDuelXX.mp3") that will be played randomly in main menu windows and when match starts.

This commit is contained in:
Vittorio Alfieri
2021-09-16 22:11:43 +02:00
parent 2af470e42b
commit f671f61713
10 changed files with 49 additions and 17 deletions

View File

@@ -12496,7 +12496,7 @@ toughness=2
[card]
name=Contamination
auto=upcost[{S(creature|mybattlefield)}] sacrifice
auto=lord(land) transforms((removetypes,newability[becomes(Swamp)])) forever
auto=lord(land) transforms((,newability[loseabilities],newability[losesubtypesof(land)],newability[becomes(swamp)]))
text=At the beginning of your upkeep, sacrifice Contamination unless you sacrifice a creature. -- If a land is tapped for mana, it produces {B} instead of any other type and amount.
mana={2}{B}
type=Enchantment

View File

@@ -131017,9 +131017,11 @@ toughness=1
[/card]
[card]
name=Walking Ballista
auto=if compare(fullpaid)~lessthan~2 then indestructible ueot
auto=counter(1/1,XX)
auto={4}:counter(1/1,1)
auto={C(1/1,-1)}:damage:1 target(creature,player)
auto={4}:name(Put 1/1 counter) counter(1/1)
auto={C(1/1,-1)}:name(Damage creature or player) damage:1 target(creature,player)
auto=if compare(fullpaid)~lessthan~2 then -indestructible ueot
text=Walking Ballista enters the battlefield with X +1/+1 counters on it. -- {4}: Put a +1/+1 counter on Walking Ballista. -- Remove a +1/+1 counter from Walking Ballista: It deals 1 damage to target creature or player.
mana={X}{X}
type=Artifact Creature

View File

@@ -2857,7 +2857,7 @@ auto=counter(0/0,5,Loyalty)
auto=token(Tibalt Emblem,Emblem,0/0,shroud,indestructible,notrigger) and!( transforms((,newability[lord(*[counter{0/0.1.TibaltExiled}]|myexile) canplayfromexile],newability[lord(*[counter{0/0.1.TibaltExiled}]|myexile) anytypeofmana],newability[{0}:name(Cast from opponent exile) target(*[counter{0/0.1.TibaltExiled}]|opponentexile) moveto(myexile) and!( transforms((,newability[counter(0/0.1.TibaltExiled)],newability[canplayfromexile],newability[anytypeofmana],newability[phaseaction[endofturn once checkex] moveTo(ownerexile)],newability[phaseaction[untap once checkex] counter(0/0.1.TibaltExiled)])) ueot )!])) forever )!
auto={C(0/0,2,Loyalty)}:name(+2: Exile the top card) all(*[zpos=1]|library) moveto(ownerexile) and!( counter(0/0,1,TibaltExiled) )!
auto={C(0/0,-3,Loyalty)}:name(-3: Exile target artifact or creature) target(*[artifact;creature]|battlefield) moveto(ownerexile) and!( counter(0/0,1,TibaltExiled) )!
auto={C(0/0,-8,Loyalty)}:name(-8: Exile all cards from all graveyards) all(*|graveyard) moveto(ownerexile) and!( counter(0/0,1,TibaltExiled) )!
auto={C(0/0,-8,Loyalty)}:name(-8: Exile all cards from all graveyards) add{R}{R}{R} && ability$!all(*|graveyard) moveto(ownerexile) and!( counter(0/0.1.TibaltExiled) )! !$ controller
text=As Tibalt enters the battlefield, you get an emblem with "You may play cards exiled with Tibalt, Cosmic Impostor, and you may spend mana as though it were mana of any color to cast those spells." -- +2: Exile the top card of each players library. -- -3: Exile target artifact or creature. -- -8: Exile all cards from all graveyards. Add {R}{R}{R}. // {1}{B} Valki, God of Lies
mana={5}{B}{R}
type=Legendary Planeswalker

View File

@@ -550,6 +550,9 @@ void GameApp::playMusic(string filename, bool loop)
if (filename.compare(currentMusicFile) == 0 && music)
return;
if(!WResourceManager::Instance()->ssLoadMusic(filename.c_str()))
return; // Added to avoid opening not existing file.
if (music)
{
JSoundSystem::GetInstance()->StopMusic(music);

View File

@@ -147,6 +147,8 @@ void GameStateAwards::Start()
detailview = NULL;
setSrc = NULL;
showMenu = false;
GameApp::playMusic("Track4.mp3"); // Added music for trophies.
}
void GameStateAwards::Create()

View File

@@ -770,16 +770,27 @@ void GameStateDuel::Update(float dt)
sprintf(temp, "ai_baka_music%i.mp3", OpponentsDeckid);
musictrack.assign(temp);
}
else if (mParent->gameType == GAME_TYPE_CLASSIC || mParent->gameType == GAME_TYPE_COMMANDER)
musictrack = "ai_baka_music.mp3";
else if (mParent->gameType == GAME_TYPE_MOMIR)
musictrack = "ai_baka_music_momir.mp3";
else if (mParent->gameType == GAME_TYPE_RANDOM1 || mParent->gameType == GAME_TYPE_RANDOM2) musictrack
= "ai_baka_music_random.mp3";
else if (mParent->gameType == GAME_TYPE_RANDOM3 || mParent->gameType == GAME_TYPE_RANDOM5) musictrack
= "ai_baka_music_random.mp3";
else if (mParent->gameType == GAME_TYPE_HORDE || mParent->gameType == GAME_TYPE_SET_LIMITED) musictrack
= "ai_baka_music_momir.mp3";
// Now it's possibile to use up to 20 sound tracks for duels.
if (!MusicExist(musictrack)){
char temp[4096];
sprintf(temp, "Battlefield/TrackDuel%i.mp3", std::rand() % 20);
musictrack.assign(temp);
}
// Try if there is a sound track for specific game type.
if (!MusicExist(musictrack)){
if (mParent->gameType == GAME_TYPE_CLASSIC)
musictrack = "ai_baka_music.mp3";
else if (mParent->gameType == GAME_TYPE_COMMANDER)
musictrack = "ai_baka_music_commander.mp3";
else if (mParent->gameType == GAME_TYPE_MOMIR)
musictrack = "ai_baka_music_momir.mp3";
else if (mParent->gameType == GAME_TYPE_RANDOM1 || mParent->gameType == GAME_TYPE_RANDOM2 || mParent->gameType == GAME_TYPE_RANDOM3 || mParent->gameType == GAME_TYPE_RANDOM5)
musictrack = "ai_baka_music_random.mp3";
else if (mParent->gameType == GAME_TYPE_HORDE)
musictrack = "ai_baka_music_horde.mp3";
else if (mParent->gameType == GAME_TYPE_SET_LIMITED)
musictrack = "ai_baka_music_limited.mp3";
}
if (!MusicExist(musictrack))
musictrack = "ai_baka_music.mp3";

View File

@@ -141,8 +141,15 @@ void GameStateMenu::Start()
subMenuController = NULL;
SAFE_DELETE(mGuiController);
GameApp::playMusic("Track0.mp3");
char temp[4096];
string musicFilename = "";
sprintf(temp, "MainMenu/TrackMenu%i.mp3", std::rand() % 20); // Now it's possibile to use up to 20 sound tracks for main menu.
musicFilename.assign(temp);
musicFilename = WResourceManager::Instance()->musicFile(musicFilename);
if (musicFilename.length() < 1 || !FileExists(musicFilename))
musicFilename = "Track0.mp3";
GameApp::playMusic(musicFilename);
hasChosenGameType = false;
mParent->gameType = GAME_TYPE_CLASSIC;

View File

@@ -142,6 +142,8 @@ void GameStateOptions::Start()
optionsMenu->Add(kCancelMenuID, "Cancel");
optionsTabs->Entering(JGE_BTN_NONE);
GameApp::playMusic("Track3.mp3"); // Added music for options.
}
void GameStateOptions::End()

View File

@@ -147,6 +147,8 @@ void GameStateShop::Start()
pspIcons[i]->SetHotSpot(16, 16);
}
GameApp::playMusic("Track2.mp3"); // Added music for shop.
JRenderer::GetInstance()->EnableVSync(true);
taskList = NULL;