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

@@ -2,8 +2,11 @@
## [master] (https://github.com/WagicProject/wagic/tree/master)
### 16/09/21
- *Committed:* 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. ([Vitty85](https://github.com/Vitty85))
### 13/09/21
- *Committed:* Fixed AFR, STA, STX and J21 sets, fixed "_PROLIFERATE_" macro and fixed primitives with "proliferate" ability, fixed all primitives with "mutate" ability, improved "proliferate" and "duplicatecounters" keywords, added a new target "permanent" to target togheter a player and permanents on battlefield (e.g. cards with "proliferate"). ([Vitty85](https://github.com/Vitty85))
- *Committed:* Fixed AFR, STA, STX and J21 sets, fixed "_PROLIFERATE_" macro and fixed primitives with "proliferate" ability, fixed all primitives with "mutate" ability, improved "proliferate" and "duplicatecounters" keywords, added a new target "permanent" to target togheter a player and permanents on battlefield (e.g. cards with "proliferate"). https://github.com/WagicProject/wagic/commit/2af470e42b9621a64373094db2ce454263d6bc51 ([Vitty85](https://github.com/Vitty85))
### 12/09/21
- *Committed:* Added/Fixed primitives, updated the "missing_cards_by_sets" folder, added a new option "keepname" to keep the original name after the copy (e.g. Olag, Ludevic's Hubris), implemented a fix to avoid triggering of oneshot abilities when "flip" ability is used to return from a copy, fixed an issue with colors and "transforms" keyword, implemented a fix to avoid crashes when the card paying extracost has also a cost alteration (e.g. combo with "Pirate's Pillage" and "Ruby Medallion"), added a new keyword "totmanaspent" to return the real amount of mana spent to cast a card (e.g. Memory Deluge), added new keywords "pnumofidentitycols" and "onumofidentitycols" to return the total amount of commander identity colors for controller or opponent (e.g. War Room), improved "totcnt" keyword, added new keywords "totalcololorsinplay" and "oppototalcololorsinplay" to return the total amount of colors on controller or opponent battlefield (e.g. Moonveil Regent), added new keywords "pcoven" and "ocoven" to return if a player controls three or more creatures with different powers (e.g. Augur of Autumn). https://github.com/WagicProject/wagic/commit/04a6a4bfe2a4ae6fd2541723e3a338343320d851 ([Vitty85](https://github.com/Vitty85))

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;