Bouton retour choix joueur
BIN
ressources/cartes/1.png
Normal file
After Width: | Height: | Size: 560 KiB |
BIN
ressources/cartes/10.png
Normal file
After Width: | Height: | Size: 541 KiB |
BIN
ressources/cartes/11.png
Normal file
After Width: | Height: | Size: 564 KiB |
BIN
ressources/cartes/12.png
Normal file
After Width: | Height: | Size: 629 KiB |
BIN
ressources/cartes/13.png
Normal file
After Width: | Height: | Size: 643 KiB |
BIN
ressources/cartes/14.png
Normal file
After Width: | Height: | Size: 546 KiB |
BIN
ressources/cartes/15.png
Normal file
After Width: | Height: | Size: 562 KiB |
BIN
ressources/cartes/16.png
Normal file
After Width: | Height: | Size: 555 KiB |
BIN
ressources/cartes/17.png
Normal file
After Width: | Height: | Size: 598 KiB |
BIN
ressources/cartes/18.png
Normal file
After Width: | Height: | Size: 585 KiB |
BIN
ressources/cartes/19.png
Normal file
After Width: | Height: | Size: 585 KiB |
BIN
ressources/cartes/2.png
Normal file
After Width: | Height: | Size: 549 KiB |
BIN
ressources/cartes/20.png
Normal file
After Width: | Height: | Size: 585 KiB |
BIN
ressources/cartes/21.png
Normal file
After Width: | Height: | Size: 595 KiB |
BIN
ressources/cartes/22.png
Normal file
After Width: | Height: | Size: 570 KiB |
BIN
ressources/cartes/23.png
Normal file
After Width: | Height: | Size: 575 KiB |
BIN
ressources/cartes/24.png
Normal file
After Width: | Height: | Size: 578 KiB |
BIN
ressources/cartes/25.png
Normal file
After Width: | Height: | Size: 583 KiB |
BIN
ressources/cartes/26.png
Normal file
After Width: | Height: | Size: 638 KiB |
BIN
ressources/cartes/27.png
Normal file
After Width: | Height: | Size: 592 KiB |
BIN
ressources/cartes/28.png
Normal file
After Width: | Height: | Size: 645 KiB |
BIN
ressources/cartes/29.png
Normal file
After Width: | Height: | Size: 584 KiB |
BIN
ressources/cartes/3.png
Normal file
After Width: | Height: | Size: 537 KiB |
BIN
ressources/cartes/30.png
Normal file
After Width: | Height: | Size: 577 KiB |
BIN
ressources/cartes/31.png
Normal file
After Width: | Height: | Size: 577 KiB |
BIN
ressources/cartes/32.png
Normal file
After Width: | Height: | Size: 591 KiB |
BIN
ressources/cartes/33.png
Normal file
After Width: | Height: | Size: 584 KiB |
BIN
ressources/cartes/34.png
Normal file
After Width: | Height: | Size: 584 KiB |
BIN
ressources/cartes/35.png
Normal file
After Width: | Height: | Size: 587 KiB |
BIN
ressources/cartes/36.png
Normal file
After Width: | Height: | Size: 666 KiB |
BIN
ressources/cartes/37.png
Normal file
After Width: | Height: | Size: 582 KiB |
BIN
ressources/cartes/38.png
Normal file
After Width: | Height: | Size: 600 KiB |
BIN
ressources/cartes/39.png
Normal file
After Width: | Height: | Size: 585 KiB |
BIN
ressources/cartes/4.png
Normal file
After Width: | Height: | Size: 564 KiB |
BIN
ressources/cartes/40.png
Normal file
After Width: | Height: | Size: 584 KiB |
BIN
ressources/cartes/41.png
Normal file
After Width: | Height: | Size: 600 KiB |
BIN
ressources/cartes/42.png
Normal file
After Width: | Height: | Size: 658 KiB |
BIN
ressources/cartes/43.png
Normal file
After Width: | Height: | Size: 586 KiB |
BIN
ressources/cartes/44.png
Normal file
After Width: | Height: | Size: 579 KiB |
BIN
ressources/cartes/45.png
Normal file
After Width: | Height: | Size: 652 KiB |
BIN
ressources/cartes/46.png
Normal file
After Width: | Height: | Size: 582 KiB |
BIN
ressources/cartes/47.png
Normal file
After Width: | Height: | Size: 579 KiB |
BIN
ressources/cartes/48.png
Normal file
After Width: | Height: | Size: 582 KiB |
BIN
ressources/cartes/49.png
Normal file
After Width: | Height: | Size: 593 KiB |
BIN
ressources/cartes/5.png
Normal file
After Width: | Height: | Size: 556 KiB |
BIN
ressources/cartes/50.png
Normal file
After Width: | Height: | Size: 585 KiB |
BIN
ressources/cartes/51.png
Normal file
After Width: | Height: | Size: 653 KiB |
BIN
ressources/cartes/52.png
Normal file
After Width: | Height: | Size: 577 KiB |
BIN
ressources/cartes/53.png
Normal file
After Width: | Height: | Size: 629 KiB |
BIN
ressources/cartes/54.png
Normal file
After Width: | Height: | Size: 584 KiB |
BIN
ressources/cartes/55.png
Normal file
After Width: | Height: | Size: 632 KiB |
BIN
ressources/cartes/56.png
Normal file
After Width: | Height: | Size: 645 KiB |
BIN
ressources/cartes/57.png
Normal file
After Width: | Height: | Size: 586 KiB |
BIN
ressources/cartes/58.png
Normal file
After Width: | Height: | Size: 90 KiB |
BIN
ressources/cartes/59.png
Normal file
After Width: | Height: | Size: 109 KiB |
BIN
ressources/cartes/6.png
Normal file
After Width: | Height: | Size: 561 KiB |
BIN
ressources/cartes/60.png
Normal file
After Width: | Height: | Size: 109 KiB |
BIN
ressources/cartes/61.png
Normal file
After Width: | Height: | Size: 124 KiB |
BIN
ressources/cartes/62.png
Normal file
After Width: | Height: | Size: 661 KiB |
BIN
ressources/cartes/63.png
Normal file
After Width: | Height: | Size: 619 KiB |
BIN
ressources/cartes/64.png
Normal file
After Width: | Height: | Size: 671 KiB |
BIN
ressources/cartes/65.png
Normal file
After Width: | Height: | Size: 649 KiB |
BIN
ressources/cartes/66.png
Normal file
After Width: | Height: | Size: 635 KiB |
BIN
ressources/cartes/67.png
Normal file
After Width: | Height: | Size: 611 KiB |
BIN
ressources/cartes/7.png
Normal file
After Width: | Height: | Size: 560 KiB |
BIN
ressources/cartes/8.png
Normal file
After Width: | Height: | Size: 554 KiB |
BIN
ressources/cartes/9.png
Normal file
After Width: | Height: | Size: 541 KiB |
@ -44,25 +44,25 @@ public class CreatingCardsTest {
|
||||
|
||||
//Ange gardien
|
||||
try {
|
||||
QueryGenerator.queryInsertObject(2,new CartePiochable(CartePiochable.Type.LUMIERE,
|
||||
DatabaseManager.queryInsertObject(2,new CartePiochable(CartePiochable.Type.LUMIERE,
|
||||
new EffetSelf(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_IMMUNITY, 1, true))));
|
||||
|
||||
//Avénement suprême
|
||||
QueryGenerator.queryInsertObject(3,new CartePiochable(CartePiochable.Type.LUMIERE,
|
||||
DatabaseManager.queryInsertObject(3,new CartePiochable(CartePiochable.Type.LUMIERE,
|
||||
new EffetSelf(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, 20, true))
|
||||
,new ConditionMultiple(new ConditionEquipe(CartePersonnage.Equipe.HUNTER), new ConditionReveal())
|
||||
));
|
||||
|
||||
//Barre de chocolat
|
||||
|
||||
QueryGenerator.queryInsertObject(4,new CartePiochable(CartePiochable.Type.LUMIERE,
|
||||
DatabaseManager.queryInsertObject(4,new CartePiochable(CartePiochable.Type.LUMIERE,
|
||||
new EffetSelf(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, 20, true))
|
||||
,new ConditionMultiple(new ConditionClassPersonnage(Allie.class,Emi.class,Metamorphe.class), new ConditionReveal())
|
||||
));
|
||||
|
||||
//Bénédiction
|
||||
|
||||
QueryGenerator.queryInsertObject(5,new CartePiochable(CartePiochable.Type.LUMIERE,new EffetChoisirCible(new ActionAltererStatistiquesJoueurRoll(Joueur.PLAYER_HP,6, true))));
|
||||
DatabaseManager.queryInsertObject(5,new CartePiochable(CartePiochable.Type.LUMIERE,new EffetChoisirCible(new ActionAltererStatistiquesJoueurRoll(Joueur.PLAYER_HP,6, true))));
|
||||
|
||||
// BOUSSOLE mystique
|
||||
|
||||
@ -73,58 +73,58 @@ public class CreatingCardsTest {
|
||||
// 8
|
||||
|
||||
// Eau bénite
|
||||
QueryGenerator.queryInsertObject(9,new CartePiochable(CartePiochable.Type.LUMIERE,new EffetSelf(new ActionAltererStatistiquesJoueurRoll(Joueur.PLAYER_HP,2, true))));
|
||||
QueryGenerator.queryInsertObject(10,new CartePiochable(CartePiochable.Type.LUMIERE,new EffetSelf(new ActionAltererStatistiquesJoueurRoll(Joueur.PLAYER_HP,2, true))));
|
||||
DatabaseManager.queryInsertObject(9,new CartePiochable(CartePiochable.Type.LUMIERE,new EffetSelf(new ActionAltererStatistiquesJoueurRoll(Joueur.PLAYER_HP,2, true))));
|
||||
DatabaseManager.queryInsertObject(10,new CartePiochable(CartePiochable.Type.LUMIERE,new EffetSelf(new ActionAltererStatistiquesJoueurRoll(Joueur.PLAYER_HP,2, true))));
|
||||
|
||||
// Eclair purificateur
|
||||
|
||||
QueryGenerator.queryInsertObject(11,new CartePiochable(CartePiochable.Type.LUMIERE,new EffetCiblerTous(new ActionAltererStatistiquesJoueurRoll(Joueur.PLAYER_HP, -2, true))));
|
||||
DatabaseManager.queryInsertObject(11,new CartePiochable(CartePiochable.Type.LUMIERE,new EffetCiblerTous(new ActionAltererStatistiquesJoueurRoll(Joueur.PLAYER_HP, -2, true))));
|
||||
|
||||
// Lance de longinus
|
||||
|
||||
QueryGenerator.queryInsertObject(12,new CarteEquipementStat(CartePiochable.Type.LUMIERE,
|
||||
DatabaseManager.queryInsertObject(12,new CarteEquipementStat(CartePiochable.Type.LUMIERE,
|
||||
new EffetSelf(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_DAMAGE, 2, true))
|
||||
,new ConditionMultiple(new ConditionEquipe(CartePersonnage.Equipe.HUNTER), new ConditionReveal())
|
||||
));
|
||||
|
||||
// Miroir divin
|
||||
|
||||
QueryGenerator.queryInsertObject(13,new CartePiochable(CartePiochable.Type.LUMIERE,new EffetSelf(new ActionReveal()),new ConditionClassPersonnage(Vampire.class,LoupGarou.class)));
|
||||
DatabaseManager.queryInsertObject(13,new CartePiochable(CartePiochable.Type.LUMIERE,new EffetSelf(new ActionReveal()),new ConditionClassPersonnage(Vampire.class,LoupGarou.class)));
|
||||
|
||||
|
||||
// Premiers secours
|
||||
|
||||
QueryGenerator.queryInsertObject(14, new CartePiochable(CartePiochable.Type.LUMIERE,new EffetCiblerTous(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, 7, false))));
|
||||
DatabaseManager.queryInsertObject(14, new CartePiochable(CartePiochable.Type.LUMIERE,new EffetCiblerTous(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, 7, false))));
|
||||
|
||||
|
||||
//Savoir ancestral
|
||||
|
||||
QueryGenerator.queryInsertObject(15, new CartePiochable(CartePiochable.Type.LUMIERE,new EffetSelf(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_TURN, 1, true))));
|
||||
DatabaseManager.queryInsertObject(15, new CartePiochable(CartePiochable.Type.LUMIERE,new EffetSelf(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_TURN, 1, true))));
|
||||
|
||||
|
||||
|
||||
//Toge sainte
|
||||
|
||||
QueryGenerator.queryInsertObject(16, new CartePiochable(CartePiochable.Type.LUMIERE,new EffetSelf(new ActionMultiple(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_RESISTANCE, 1, true),new ActionAltererStatistiquesJoueur(Joueur.PLAYER_DAMAGE, -1, true)))));
|
||||
DatabaseManager.queryInsertObject(16, new CartePiochable(CartePiochable.Type.LUMIERE,new EffetSelf(new ActionMultiple(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_RESISTANCE, 1, true),new ActionAltererStatistiquesJoueur(Joueur.PLAYER_DAMAGE, -1, true)))));
|
||||
|
||||
|
||||
// Ténèbre
|
||||
|
||||
// Araignée Sanguinaire
|
||||
|
||||
QueryGenerator.queryInsertObject(17, new CartePiochable(CartePiochable.Type.TENEBRE,new EffetMultiple(new EffetCiblerTous(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, -2, true)),
|
||||
DatabaseManager.queryInsertObject(17, new CartePiochable(CartePiochable.Type.TENEBRE,new EffetMultiple(new EffetCiblerTous(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, -2, true)),
|
||||
new EffetSelf(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, -2, true)))));
|
||||
|
||||
|
||||
// Chauve - souris vampire
|
||||
|
||||
QueryGenerator.queryInsertObject(18, new CartePiochable(CartePiochable.Type.TENEBRE,new EffetMultiple(new EffetCiblerTous(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, -2, true)),
|
||||
DatabaseManager.queryInsertObject(18, new CartePiochable(CartePiochable.Type.TENEBRE,new EffetMultiple(new EffetCiblerTous(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, -2, true)),
|
||||
new EffetSelf(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, 1, true)))));
|
||||
|
||||
QueryGenerator.queryInsertObject(19, new CartePiochable(CartePiochable.Type.TENEBRE,new EffetMultiple(new EffetCiblerTous(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, -2, true)),
|
||||
DatabaseManager.queryInsertObject(19, new CartePiochable(CartePiochable.Type.TENEBRE,new EffetMultiple(new EffetCiblerTous(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, -2, true)),
|
||||
new EffetSelf(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, 1, true)))));
|
||||
|
||||
QueryGenerator.queryInsertObject(20, new CartePiochable(CartePiochable.Type.TENEBRE,new EffetMultiple(new EffetCiblerTous(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, -2, true)),
|
||||
DatabaseManager.queryInsertObject(20, new CartePiochable(CartePiochable.Type.TENEBRE,new EffetMultiple(new EffetCiblerTous(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, -2, true)),
|
||||
new EffetSelf(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, 1, true)))));
|
||||
|
||||
// Dynamite
|
||||
@ -133,11 +133,11 @@ public class CreatingCardsTest {
|
||||
|
||||
|
||||
// Hache tueuse
|
||||
QueryGenerator.queryInsertObject(22,new CarteEquipementStat(CartePiochable.Type.TENEBRE,
|
||||
DatabaseManager.queryInsertObject(22,new CarteEquipementStat(CartePiochable.Type.TENEBRE,
|
||||
new EffetSelf(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_DAMAGE, 1, true))));
|
||||
|
||||
// Hachoir maudit
|
||||
QueryGenerator.queryInsertObject(23,new CarteEquipementStat(CartePiochable.Type.TENEBRE,
|
||||
DatabaseManager.queryInsertObject(23,new CarteEquipementStat(CartePiochable.Type.TENEBRE,
|
||||
new EffetSelf(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_DAMAGE, 1, true))));
|
||||
|
||||
|
||||
@ -150,39 +150,39 @@ public class CreatingCardsTest {
|
||||
// Poupé démoniaque
|
||||
// 26
|
||||
|
||||
QueryGenerator.queryInsertObject(28,new CartePiochable(CartePiochable.Type.TENEBRE,
|
||||
DatabaseManager.queryInsertObject(28,new CartePiochable(CartePiochable.Type.TENEBRE,
|
||||
new EffetSelf(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, 20, true))
|
||||
,new ConditionMultiple(new ConditionEquipe(CartePersonnage.Equipe.SHADOW), new ConditionReveal())
|
||||
));
|
||||
|
||||
// 29
|
||||
|
||||
QueryGenerator.queryInsertObject(30,new CartePiochable(CartePiochable.Type.TENEBRE,
|
||||
DatabaseManager.queryInsertObject(30,new CartePiochable(CartePiochable.Type.TENEBRE,
|
||||
new EffetChoisirCible(new ActionVoler(ActionVoler.VOLER))));
|
||||
|
||||
QueryGenerator.queryInsertObject(31,new CartePiochable(CartePiochable.Type.TENEBRE,
|
||||
DatabaseManager.queryInsertObject(31,new CartePiochable(CartePiochable.Type.TENEBRE,
|
||||
new EffetChoisirCible(new ActionVoler(ActionVoler.VOLER))));
|
||||
|
||||
QueryGenerator.queryInsertObject(32,new CarteEquipementStat(CartePiochable.Type.TENEBRE,
|
||||
DatabaseManager.queryInsertObject(32,new CarteEquipementStat(CartePiochable.Type.TENEBRE,
|
||||
new EffetSelf(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_DAMAGE, 1, true))));
|
||||
|
||||
|
||||
// Vision clairvoyante
|
||||
QueryGenerator.queryInsertObject(33, new CartePiochable(CartePiochable.Type.VISION,new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, -1, true)),
|
||||
DatabaseManager.queryInsertObject(33, new CartePiochable(CartePiochable.Type.VISION,new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, -1, true)),
|
||||
new ConditionStatistiques(ConditionStatistiques.JOUEUR, Joueur.PLAYER_HP, 11, ConditionStatistiques.LESS)));
|
||||
|
||||
// Vision cupide
|
||||
|
||||
QueryGenerator.queryInsertObject(34,new CartePiochable(CartePiochable.Type.VISION,new EffetChoisirEffet(new EffetChoisirCible(new ActionVoler(ActionVoler.DONNER)),new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true))),
|
||||
DatabaseManager.queryInsertObject(34,new CartePiochable(CartePiochable.Type.VISION,new EffetChoisirEffet(new EffetChoisirCible(new ActionVoler(ActionVoler.DONNER)),new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true))),
|
||||
new ConditionEquipe(CartePersonnage.Equipe.NEUTRE,CartePersonnage.Equipe.SHADOW)));
|
||||
|
||||
QueryGenerator.queryInsertObject(35,new CartePiochable(CartePiochable.Type.VISION,new EffetChoisirEffet(new EffetChoisirCible(new ActionVoler(ActionVoler.DONNER)),new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true))),
|
||||
DatabaseManager.queryInsertObject(35,new CartePiochable(CartePiochable.Type.VISION,new EffetChoisirEffet(new EffetChoisirCible(new ActionVoler(ActionVoler.DONNER)),new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true))),
|
||||
new ConditionEquipe(CartePersonnage.Equipe.NEUTRE,CartePersonnage.Equipe.SHADOW)));
|
||||
|
||||
|
||||
// Vision destructrice
|
||||
|
||||
QueryGenerator.queryInsertObject(36, new CartePiochable(CartePiochable.Type.VISION,new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, -2, true)),
|
||||
DatabaseManager.queryInsertObject(36, new CartePiochable(CartePiochable.Type.VISION,new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, -2, true)),
|
||||
new ConditionStatistiques(ConditionStatistiques.JOUEUR, Joueur.PLAYER_HP, 12, ConditionStatistiques.MORE)));
|
||||
|
||||
|
||||
@ -190,53 +190,53 @@ public class CreatingCardsTest {
|
||||
|
||||
// Vision enivrante
|
||||
|
||||
QueryGenerator.queryInsertObject(38,new CartePiochable(CartePiochable.Type.VISION,new EffetChoisirEffet(new EffetChoisirCible(new ActionVoler(ActionVoler.DONNER)),new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true))),
|
||||
DatabaseManager.queryInsertObject(38,new CartePiochable(CartePiochable.Type.VISION,new EffetChoisirEffet(new EffetChoisirCible(new ActionVoler(ActionVoler.DONNER)),new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true))),
|
||||
new ConditionEquipe(CartePersonnage.Equipe.NEUTRE,CartePersonnage.Equipe.SHADOW)));
|
||||
|
||||
QueryGenerator.queryInsertObject(39,new CartePiochable(CartePiochable.Type.VISION,new EffetChoisirEffet(new EffetChoisirCible(new ActionVoler(ActionVoler.DONNER)),new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true))),
|
||||
DatabaseManager.queryInsertObject(39,new CartePiochable(CartePiochable.Type.VISION,new EffetChoisirEffet(new EffetChoisirCible(new ActionVoler(ActionVoler.DONNER)),new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true))),
|
||||
new ConditionEquipe(CartePersonnage.Equipe.NEUTRE,CartePersonnage.Equipe.SHADOW)));
|
||||
|
||||
// Vision Foudroyante
|
||||
|
||||
QueryGenerator.queryInsertObject(40,new CartePiochable(CartePiochable.Type.VISION,new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true)),
|
||||
DatabaseManager.queryInsertObject(40,new CartePiochable(CartePiochable.Type.VISION,new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true)),
|
||||
new ConditionEquipe(CartePersonnage.Equipe.SHADOW)));
|
||||
|
||||
|
||||
// Vision furtive
|
||||
|
||||
QueryGenerator.queryInsertObject(41,new CartePiochable(CartePiochable.Type.VISION,new EffetChoisirEffet(new EffetChoisirCible(new ActionVoler(ActionVoler.DONNER)),new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true))),
|
||||
DatabaseManager.queryInsertObject(41,new CartePiochable(CartePiochable.Type.VISION,new EffetChoisirEffet(new EffetChoisirCible(new ActionVoler(ActionVoler.DONNER)),new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true))),
|
||||
new ConditionEquipe(CartePersonnage.Equipe.HUNTER,CartePersonnage.Equipe.SHADOW)));
|
||||
|
||||
QueryGenerator.queryInsertObject(42,new CartePiochable(CartePiochable.Type.VISION,new EffetChoisirEffet(new EffetChoisirCible(new ActionVoler(ActionVoler.DONNER)),new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true))),
|
||||
DatabaseManager.queryInsertObject(42,new CartePiochable(CartePiochable.Type.VISION,new EffetChoisirEffet(new EffetChoisirCible(new ActionVoler(ActionVoler.DONNER)),new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true))),
|
||||
new ConditionEquipe(CartePersonnage.Equipe.HUNTER,CartePersonnage.Equipe.SHADOW)));
|
||||
|
||||
// Vision Mortifère
|
||||
|
||||
QueryGenerator.queryInsertObject(43,new CartePiochable(CartePiochable.Type.VISION,new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true)),
|
||||
DatabaseManager.queryInsertObject(43,new CartePiochable(CartePiochable.Type.VISION,new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true)),
|
||||
new ConditionEquipe(CartePersonnage.Equipe.SHADOW)));
|
||||
|
||||
|
||||
// Vision lugubre
|
||||
|
||||
QueryGenerator.queryInsertObject(45,new CartePiochable(CartePiochable.Type.VISION,new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-2,true)),
|
||||
DatabaseManager.queryInsertObject(45,new CartePiochable(CartePiochable.Type.VISION,new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-2,true)),
|
||||
new ConditionEquipe(CartePersonnage.Equipe.SHADOW)));
|
||||
|
||||
// Vision réconfortante
|
||||
|
||||
// Vision suprême
|
||||
|
||||
QueryGenerator.queryInsertObject(48,new Allie());
|
||||
QueryGenerator.queryInsertObject(49,new Bob());
|
||||
QueryGenerator.queryInsertObject(50,new Charles());
|
||||
DatabaseManager.queryInsertObject(48,new Allie());
|
||||
DatabaseManager.queryInsertObject(49,new Bob());
|
||||
DatabaseManager.queryInsertObject(50,new Charles());
|
||||
|
||||
QueryGenerator.queryInsertObject(51,new Daniel());
|
||||
QueryGenerator.queryInsertObject(52,new Emi());
|
||||
QueryGenerator.queryInsertObject(53,new Franklin());
|
||||
DatabaseManager.queryInsertObject(51,new Daniel());
|
||||
DatabaseManager.queryInsertObject(52,new Emi());
|
||||
DatabaseManager.queryInsertObject(53,new Franklin());
|
||||
|
||||
QueryGenerator.queryInsertObject(54,new Georges());
|
||||
QueryGenerator.queryInsertObject(55,new LoupGarou());
|
||||
QueryGenerator.queryInsertObject(56,new Metamorphe());
|
||||
QueryGenerator.queryInsertObject(57,new Vampire());
|
||||
DatabaseManager.queryInsertObject(54,new Georges());
|
||||
DatabaseManager.queryInsertObject(55,new LoupGarou());
|
||||
DatabaseManager.queryInsertObject(56,new Metamorphe());
|
||||
DatabaseManager.queryInsertObject(57,new Vampire());
|
||||
} catch (IOException | SQLException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
|
@ -1,7 +1,13 @@
|
||||
package database;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
@ -36,4 +42,60 @@ public class DatabaseManager {
|
||||
return list;
|
||||
}
|
||||
|
||||
public static List<Record> remplirTableSansImage(String query) {
|
||||
List<Record> list = new ArrayList<Record>();
|
||||
try (Connection connection = connect()) {
|
||||
|
||||
//System.out.println("Connected to PostgreSQL database!");
|
||||
Statement statement = connection.createStatement();
|
||||
//System.out.println("Reading records...");
|
||||
ResultSet retour = statement.executeQuery(query);
|
||||
while (retour.next()) {
|
||||
list.add(new Record(retour.getString("id"), retour.getString("nom"), null, retour.getBytes("objet")));
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
System.err.println("Connection failure.");
|
||||
e.printStackTrace();
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public static void queryInsertObject(int id, Object o) throws IOException, SQLException {
|
||||
|
||||
String table = null;
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
ObjectOutputStream oos;
|
||||
|
||||
oos = new ObjectOutputStream(baos);
|
||||
oos.writeObject(o);
|
||||
oos.close();
|
||||
|
||||
ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
|
||||
|
||||
byte[] object = bais.readAllBytes();
|
||||
InputStream objectIS = new ByteArrayInputStream(object);
|
||||
|
||||
if(id <= 16) {
|
||||
table = QueryGenerator.getTable("CartesLumiere");
|
||||
} else if(id <= 32) {
|
||||
table = QueryGenerator.getTable("CartesTenebre");
|
||||
} else if(id <= 47) {
|
||||
table = QueryGenerator.getTable("CartesVision");
|
||||
} else if(id <= 57) {
|
||||
table = QueryGenerator.getTable("CartesPersonnage");
|
||||
} else if(id <= 61) {
|
||||
table = QueryGenerator.getTable("CartesDos");
|
||||
}
|
||||
|
||||
String query = null;
|
||||
query = "UPDATE " + table + " SET objet = ? "
|
||||
+ " WHERE id = ? " ;
|
||||
|
||||
Connection conn = connect();
|
||||
PreparedStatement pst = conn.prepareStatement(query);
|
||||
pst.setBinaryStream(1, objectIS);
|
||||
pst.setInt(2, id);
|
||||
pst.executeUpdate();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,13 +1,7 @@
|
||||
package database;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class QueryGenerator {
|
||||
@ -64,41 +58,5 @@ public class QueryGenerator {
|
||||
return "SELECT * FROM " + table + " WHERE id = " + id;
|
||||
}
|
||||
|
||||
public static void queryInsertObject(int id, Object o) throws IOException, SQLException {
|
||||
|
||||
String table = null;
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
ObjectOutputStream oos;
|
||||
|
||||
oos = new ObjectOutputStream(baos);
|
||||
oos.writeObject(o);
|
||||
oos.close();
|
||||
|
||||
ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
|
||||
|
||||
byte[] object = bais.readAllBytes();
|
||||
InputStream objectIS = new ByteArrayInputStream(object);
|
||||
|
||||
if(id <= 16) {
|
||||
table = getTable("CartesLumiere");
|
||||
} else if(id <= 32) {
|
||||
table = getTable("CartesTenebre");
|
||||
} else if(id <= 47) {
|
||||
table = getTable("CartesVision");
|
||||
} else if(id <= 57) {
|
||||
table = getTable("CartesPersonnage");
|
||||
} else if(id <= 61) {
|
||||
table = getTable("CartesDos");
|
||||
}
|
||||
|
||||
String query = null;
|
||||
query = "UPDATE " + table + " SET objet = ? "
|
||||
+ " WHERE id = ? " ;
|
||||
|
||||
Connection conn = connect();
|
||||
PreparedStatement pst = conn.prepareStatement(query);
|
||||
pst.setBinaryStream(1, objectIS);
|
||||
pst.setInt(2, id);
|
||||
pst.executeUpdate();
|
||||
}
|
||||
}
|
||||
|
@ -31,15 +31,15 @@ public class Record {
|
||||
this.obj = obj;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
protected String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getNom() {
|
||||
protected String getNom() {
|
||||
return nom;
|
||||
}
|
||||
|
||||
public byte[] getImg() {
|
||||
protected byte[] getImg() {
|
||||
return img;
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ public class Record {
|
||||
return String.format("%-20.30s %-30.30s %-20.30s %-20.30s%n", this.getId(), this.getNom(), this.getImg(), this.getObjet());
|
||||
}
|
||||
|
||||
public byte[] getObjet() {
|
||||
protected byte[] getObjet() {
|
||||
return this.obj;
|
||||
}
|
||||
|
||||
|
@ -1,16 +1,46 @@
|
||||
package database;
|
||||
|
||||
import java.awt.Image;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
|
||||
import carte.Carte;
|
||||
import carte.CartePiochable;
|
||||
import personnage.CartePersonnage;
|
||||
|
||||
public class RessourceLoader {
|
||||
|
||||
|
||||
public static final String CARTES_PERSONNAGE = "cp";
|
||||
public static final String CARTES_LUMIERE = "cl";
|
||||
public static final String CARTES_TENEBRE = "ct";
|
||||
public static final String CARTES_VISION = "cv";
|
||||
|
||||
public static final String DOS_PERSONNAGE = "dp";
|
||||
public static final String DOS_LUMIERE = "dl";
|
||||
public static final String DOS_TENEBRE = "dt";
|
||||
public static final String DOS_VISION = "dv";
|
||||
|
||||
private final int ID_DOS_PERSONNAGE = 60;
|
||||
private final int ID_DOS_LUMIERE = 58;
|
||||
private final int ID_DOS_TENEBRE= 59;
|
||||
private final int ID_DOS_VISION= 61;
|
||||
|
||||
private Map<String, Map<Carte, Image>> ressourcesCartes;
|
||||
private Map<String, Image> ressourcesDosCartes;
|
||||
|
||||
|
||||
public RessourceLoader() {
|
||||
this.ressourcesCartes = new HashMap<String, Map<Carte,Image>>();
|
||||
this.ressourcesDosCartes = new HashMap<String, Image>();
|
||||
}
|
||||
|
||||
private static Map<Integer, Carte> loadCards() throws ClassNotFoundException, IOException{
|
||||
|
||||
Table t = new Table();
|
||||
@ -30,9 +60,9 @@ public class RessourceLoader {
|
||||
return cartes;
|
||||
}
|
||||
|
||||
private static Map<Integer, CartePiochable> getMapType(CartePiochable.Type t, Map<Integer, Carte> cartes){
|
||||
private static Map<Integer, Carte> getMapType(CartePiochable.Type t, Map<Integer, Carte> cartes){
|
||||
|
||||
Map<Integer, CartePiochable> cartesType = new HashMap<Integer, CartePiochable>();
|
||||
Map<Integer, Carte> cartesType = new HashMap<Integer, Carte>();
|
||||
|
||||
for(Integer i: cartes.keySet()) {
|
||||
|
||||
@ -50,25 +80,86 @@ public class RessourceLoader {
|
||||
return cartesType;
|
||||
}
|
||||
|
||||
private static Map<Integer, Carte> getMapPersonnage(Map<Integer, Carte> cartes){
|
||||
|
||||
Map<Integer, Carte> cartesPersonnage = new HashMap<Integer, Carte>();
|
||||
|
||||
public static Object deserialize(byte[] data) throws IOException, ClassNotFoundException {
|
||||
for(Integer i: cartes.keySet()) {
|
||||
|
||||
Carte c = cartes.get(i);
|
||||
if(cartes.get(i) instanceof CartePersonnage) {
|
||||
|
||||
CartePersonnage carte = (CartePersonnage) c;
|
||||
cartesPersonnage.put(i,carte);
|
||||
}
|
||||
}
|
||||
return cartesPersonnage;
|
||||
}
|
||||
|
||||
private static Object deserialize(byte[] data) throws IOException, ClassNotFoundException {
|
||||
ByteArrayInputStream in = new ByteArrayInputStream(data);
|
||||
ObjectInputStream is = new ObjectInputStream(in);
|
||||
return is.readObject();
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
private static Image loadImage(int id) throws IOException {
|
||||
String name = ""+id+".png";
|
||||
String url = "ressources/cartes/"+name;
|
||||
System.out.println(url);
|
||||
Image picture = ImageIO.read(new File(url));
|
||||
return picture;
|
||||
}
|
||||
|
||||
private static Map<Carte, Image> getMapImageCarte(Map<Integer, Carte> cartes) throws IOException{
|
||||
|
||||
Map<Carte, Image> mapCarteImage = new HashMap<Carte, Image>();
|
||||
|
||||
for(Integer i : cartes.keySet()) {
|
||||
|
||||
Carte c = cartes.get(i);
|
||||
Image img = loadImage(i);
|
||||
mapCarteImage.put(c,img);
|
||||
}
|
||||
|
||||
return mapCarteImage;
|
||||
}
|
||||
|
||||
|
||||
public void loadRessources() {
|
||||
|
||||
try {
|
||||
Map<Integer, Carte> cartes = loadCards();
|
||||
System.out.println(cartes);
|
||||
System.out.println(getMapType(CartePiochable.Type.TENEBRE, cartes));
|
||||
|
||||
} catch (ClassNotFoundException | IOException e) {
|
||||
Map<Integer, Carte> mapT = getMapType(CartePiochable.Type.TENEBRE, cartes);
|
||||
Map<Integer, Carte> mapL = getMapType(CartePiochable.Type.LUMIERE, cartes);
|
||||
Map<Integer, Carte> mapV = getMapType(CartePiochable.Type.VISION, cartes);
|
||||
Map<Integer, Carte> mapP = getMapPersonnage(cartes);
|
||||
|
||||
Map<Carte, Image> mapIT = getMapImageCarte(mapT);
|
||||
Map<Carte, Image> mapIL = getMapImageCarte(mapT);
|
||||
Map<Carte, Image> mapIV = getMapImageCarte(mapT);
|
||||
Map<Carte, Image> mapIP = getMapImageCarte(mapT);
|
||||
|
||||
|
||||
this.ressourcesCartes.put(CARTES_TENEBRE, mapIT);
|
||||
this.ressourcesCartes.put(CARTES_LUMIERE, mapIL);
|
||||
this.ressourcesCartes.put(CARTES_LUMIERE, mapIV);
|
||||
this.ressourcesCartes.put(CARTES_LUMIERE, mapIP);
|
||||
|
||||
this.ressourcesDosCartes.put(DOS_TENEBRE, loadImage(ID_DOS_TENEBRE));
|
||||
this.ressourcesDosCartes.put(DOS_LUMIERE, loadImage(ID_DOS_LUMIERE));
|
||||
this.ressourcesDosCartes.put(DOS_VISION, loadImage(ID_DOS_VISION));
|
||||
this.ressourcesDosCartes.put(DOS_PERSONNAGE, loadImage(ID_DOS_PERSONNAGE));
|
||||
|
||||
} catch (IOException | ClassNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
RessourceLoader rl = new RessourceLoader();
|
||||
rl.loadRessources();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -28,9 +28,8 @@ public class Table {
|
||||
public void remplirTableQuery(String query) {
|
||||
try (Connection connection = DriverManager.getConnection("jdbc:postgresql://localhost:5432/ShadowHunterDatabase", "shManager", "shadowhunter1234")) { //notre utilisateur que l'on utilisera (:
|
||||
|
||||
System.out.println("Connected to PostgreSQL database!");
|
||||
Statement statement = connection.createStatement();
|
||||
System.out.println("Reading records...");
|
||||
|
||||
ResultSet retour = statement.executeQuery(query);
|
||||
while (retour.next()) {
|
||||
list.add(new Record(retour.getString("id"), retour.getString("nom"), null, retour.getBytes("objet")));
|
||||
@ -59,16 +58,6 @@ public class Table {
|
||||
}
|
||||
|
||||
protected boolean isEmpty() {
|
||||
if(list.isEmpty()) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
return list.isEmpty();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
jouer=Jouer
|
||||
regles=Régles
|
||||
regles=Règles
|
||||
commencer.partie=Commencer la partie
|
||||
entrez.nom.joueur= Entrez le nom des joueurs
|
||||
nombre.joueur.minimum=(Il faut au moins 4 joueurs)
|
||||
|
@ -1,5 +1,5 @@
|
||||
jouer=Jouer
|
||||
regles=Régles
|
||||
regles=Règles
|
||||
commencer.partie=Commencer la partie
|
||||
entrez.nom.joueur= Entrez le nom des joueurs
|
||||
nombre.joueur.minimum=(Il faut au moins 4 joueurs)
|
||||
|
@ -6,25 +6,32 @@ import java.io.InputStream;
|
||||
import javax.sound.sampled.AudioInputStream;
|
||||
import javax.sound.sampled.AudioSystem;
|
||||
import javax.sound.sampled.Clip;
|
||||
|
||||
import javax.sound.sampled.FloatControl;
|
||||
|
||||
public class Musique {
|
||||
|
||||
public static Clip clip;
|
||||
public static long clipTimePosition = 0;
|
||||
|
||||
public static boolean musiqueEnCours = false;
|
||||
static FloatControl volume ;
|
||||
|
||||
public static void playMusique(InputStream path) {
|
||||
|
||||
try {
|
||||
|
||||
InputStream musicPath = path;
|
||||
|
||||
if (musicPath!=null) {
|
||||
if (musicPath != null) {
|
||||
InputStream bufferedIn = new BufferedInputStream(musicPath);
|
||||
|
||||
AudioInputStream audioInput = AudioSystem.getAudioInputStream(bufferedIn);
|
||||
clip = AudioSystem.getClip();
|
||||
clip.open(audioInput);
|
||||
|
||||
volume = (FloatControl) clip.getControl(FloatControl.Type.MASTER_GAIN);
|
||||
volume.setValue(-20.0f); // Reduit le volume de 20 decibels.
|
||||
|
||||
clip.start();
|
||||
clip.loop(Clip.LOOP_CONTINUOUSLY);
|
||||
|
||||
@ -47,4 +54,12 @@ public class Musique {
|
||||
clip.start();
|
||||
}
|
||||
|
||||
public static void volumeUp(Float valeur) {
|
||||
volume.setValue(volume.getValue() +valeur);
|
||||
}
|
||||
|
||||
public static void volumeDown(Float valeur) {
|
||||
volume.setValue(volume.getValue() -valeur);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -30,6 +30,8 @@ public class MenuController implements Initializable{
|
||||
input = getClass().getResourceAsStream("/ihm/ressources/img/logo.png");
|
||||
Image image = new Image(input);
|
||||
titre.setImage(image);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@FXML
|
||||
|
@ -42,6 +42,7 @@ public class ParametreController implements Initializable {
|
||||
|
||||
@Override
|
||||
public void initialize(URL arg0, ResourceBundle arg1) {
|
||||
|
||||
langues.getItems().add("Anglais");
|
||||
langues.getItems().add("Allemand");
|
||||
langues.getItems().add("Espagnol");
|
||||
@ -59,11 +60,12 @@ public class ParametreController implements Initializable {
|
||||
|
||||
if (cmusique.isSelected() == true) {
|
||||
cbMusiqueCoche = true;
|
||||
if (Musique.clipTimePosition == 0 && MusiqueLancee == false) { // si la musique n'a jamais été lancé
|
||||
if (Musique.clipTimePosition == 0 && MusiqueLancee == false && Musique.musiqueEnCours != true) { // si la musique n'a jamais été lancé
|
||||
Musique.playMusique(fileMusique);
|
||||
Musique.musiqueEnCours = true;
|
||||
MusiqueLancee = true;
|
||||
|
||||
} else {
|
||||
} else if (Musique.musiqueEnCours != true) {
|
||||
Musique.resumeMusique(Musique.clip); // si elle a deja été lancé mais mis en pause, reprend a partir du point d'arret
|
||||
}
|
||||
|
||||
@ -71,6 +73,7 @@ public class ParametreController implements Initializable {
|
||||
if (cbMusiqueCoche == true) {
|
||||
cbMusiqueCoche = false;
|
||||
Musique.pauseMusique(Musique.clip); //met en pause la musique
|
||||
Musique.musiqueEnCours = false;
|
||||
}
|
||||
|
||||
}
|
||||
@ -138,4 +141,16 @@ public class ParametreController implements Initializable {
|
||||
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void monterVolume(MouseEvent mouseEvent) throws IOException{
|
||||
Musique.volumeUp(5.f);
|
||||
System.out.println("on monte le son");
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void baisserVolume(MouseEvent mouseEvent) throws IOException{
|
||||
Musique.volumeDown(5.f);
|
||||
System.out.println("on baisse le son");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -56,17 +56,21 @@ public class PauseController implements Initializable {
|
||||
if (cbMusique.isSelected()) {
|
||||
System.out.println("\tLancement de la musique");
|
||||
|
||||
if (Musique.clipTimePosition == 0 && MusiqueLancee == false) { // si la musique n'a jamais été lancé
|
||||
if (Musique.clipTimePosition == 0 && MusiqueLancee == false && Musique.musiqueEnCours != true) { // si la musique n'a jamais été lancé
|
||||
Musique.playMusique(fileMusique);
|
||||
Musique.musiqueEnCours = true;
|
||||
MusiqueLancee = true;
|
||||
} else
|
||||
} else if (MusiqueLancee ==false && Musique.musiqueEnCours != true) {
|
||||
Musique.resumeMusique(Musique.clip); // si elle a deja été lancé mais mis en pause, reprend a partir du point d'arret
|
||||
} else {
|
||||
}
|
||||
|
||||
} else if (MusiqueLancee == true){
|
||||
Musique.pauseMusique(Musique.clip); // met en pause la musique
|
||||
Musique.musiqueEnCours = false;
|
||||
MusiqueLancee = false;
|
||||
System.out.println("\tMise en pause de la musique");
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
System.out.println("fichier audio non trouvé");
|
||||
}
|
||||
|
||||
@ -98,6 +102,7 @@ public class PauseController implements Initializable {
|
||||
System.err.println("Fin de partie");
|
||||
Stage appStage = (Stage) ((Node) me.getSource()).getScene().getWindow();
|
||||
appStage.close();
|
||||
<<<<<<< HEAD
|
||||
|
||||
/* final URL fxmlURL = getClass().getResource("/ihm/ressources/Menu.fxml");
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRENCH);
|
||||
@ -106,5 +111,25 @@ public class PauseController implements Initializable {
|
||||
|
||||
|
||||
|
||||
=======
|
||||
|
||||
final URL fxmlURL = getClass().getResource("/ihm/ressources/Menu.fxml");
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRENCH);
|
||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||
AnchorPane root = fxmlLoader.load();
|
||||
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void monterVolume(MouseEvent mouseEvent) throws IOException{
|
||||
Musique.volumeUp(5.f);
|
||||
System.out.println("on monte le son");
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void baisserVolume(MouseEvent mouseEvent) throws IOException{
|
||||
Musique.volumeDown(5.f);
|
||||
System.out.println("on baisse le son");
|
||||
>>>>>>> 9fca28f7bb31a2ae6de169307adf781247bc61a4
|
||||
}
|
||||
}
|
||||
|
@ -39,14 +39,18 @@ public class ReglesControlleur implements Initializable {
|
||||
|
||||
@FXML
|
||||
public void pageSuivante(MouseEvent mouseEvent) throws IOException {
|
||||
InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav");
|
||||
EffetSonore.playSoundEffect(fileSound1);
|
||||
|
||||
if (index < 4) {
|
||||
index++;
|
||||
InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav");
|
||||
EffetSonore.playSoundEffect(fileSound1);
|
||||
System.out.println("Page suivante");
|
||||
} else {
|
||||
InputStream fileSound2 = getClass().getResourceAsStream("/ihm/ressources/musique/BeepError.wav");
|
||||
EffetSonore.playSoundEffect(fileSound2);
|
||||
System.out.println("C'est la dernière page!");
|
||||
}
|
||||
|
||||
System.out.println("Page suivante");
|
||||
InputStream input = getClass().getResourceAsStream("/ihm/ressources/img/Regle" + index + ".png");
|
||||
Image image = new Image(input);
|
||||
imageRegles.setImage(image);
|
||||
@ -55,14 +59,18 @@ public class ReglesControlleur implements Initializable {
|
||||
|
||||
@FXML
|
||||
public void pagePrecedente(MouseEvent mouseEvent) throws IOException {
|
||||
InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav");
|
||||
EffetSonore.playSoundEffect(fileSound1);
|
||||
|
||||
if (index > 1) {
|
||||
index--;
|
||||
InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav");
|
||||
EffetSonore.playSoundEffect(fileSound1);
|
||||
System.out.println("Page précédente");
|
||||
} else {
|
||||
InputStream fileSound2 = getClass().getResourceAsStream("/ihm/ressources/musique/BeepError.wav");
|
||||
EffetSonore.playSoundEffect(fileSound2);
|
||||
System.out.println("C'est la première page!");
|
||||
}
|
||||
|
||||
System.out.println("Page précédente");
|
||||
InputStream input = getClass().getResourceAsStream("/ihm/ressources/img/Regle" + index + ".png");
|
||||
Image image = new Image(input);
|
||||
imageRegles.setImage(image);
|
||||
|
@ -9,7 +9,6 @@
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
|
||||
|
||||
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="480.0" prefWidth="640.0" style="-fx-border-color: white; -fx-background-color: black;" stylesheets="@style/popUp.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.PauseController">
|
||||
<children>
|
||||
<VBox alignment="TOP_CENTER" prefHeight="480.0" prefWidth="640.0">
|
||||
@ -46,6 +45,29 @@
|
||||
<Insets bottom="5.0" />
|
||||
</VBox.margin>
|
||||
</HBox>
|
||||
<HBox prefHeight="38.0" prefWidth="337.0">
|
||||
<children>
|
||||
<Button mnemonicParsing="false" onMouseClicked="#monterVolume" text="Volume +">
|
||||
<font>
|
||||
<Font size="14.0" />
|
||||
</font>
|
||||
<HBox.margin>
|
||||
<Insets right="10.0" />
|
||||
</HBox.margin>
|
||||
</Button>
|
||||
<Button mnemonicParsing="false" onMouseClicked="#baisserVolume" text="Volume -">
|
||||
<font>
|
||||
<Font size="14.0" />
|
||||
</font>
|
||||
<HBox.margin>
|
||||
<Insets left="10.0" />
|
||||
</HBox.margin>
|
||||
</Button>
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="10.0" top="10.0" />
|
||||
</padding>
|
||||
</HBox>
|
||||
<HBox alignment="CENTER_LEFT">
|
||||
<children>
|
||||
<Label text="Effet sonores">
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.control.CheckBox?>
|
||||
<?import javafx.scene.control.ComboBox?>
|
||||
@ -13,12 +14,29 @@
|
||||
<children>
|
||||
<HBox alignment="TOP_CENTER" layoutX="146.0" layoutY="171.0" prefHeight="242.0" prefWidth="507.0" spacing="10.0">
|
||||
<children>
|
||||
<VBox prefHeight="309.0" prefWidth="127.0" spacing="50.0">
|
||||
<VBox prefHeight="348.0" prefWidth="195.0" spacing="40.0">
|
||||
<children>
|
||||
<CheckBox fx:id="clair" mnemonicParsing="false" styleClass="checkBox" text="%mode.claire" />
|
||||
<CheckBox fx:id="cmusique" mnemonicParsing="false" styleClass="checkBox" text="%musique" />
|
||||
<HBox alignment="CENTER_LEFT" prefHeight="100.0" prefWidth="195.0">
|
||||
<children>
|
||||
<Button mnemonicParsing="false" onMouseClicked="#monterVolume" styleClass="bouton" stylesheets="@style/menu.css" text="Volume +">
|
||||
<opaqueInsets>
|
||||
<Insets />
|
||||
</opaqueInsets>
|
||||
<HBox.margin>
|
||||
<Insets right="10.0" />
|
||||
</HBox.margin>
|
||||
</Button>
|
||||
<Button layoutX="10.0" layoutY="10.0" mnemonicParsing="false" onMouseClicked="#baisserVolume" styleClass="bouton" stylesheets="@style/menu.css" text="Volume -">
|
||||
<HBox.margin>
|
||||
<Insets left="10.0" />
|
||||
</HBox.margin>
|
||||
</Button>
|
||||
</children>
|
||||
</HBox>
|
||||
<CheckBox fx:id="cbEffetSonore" mnemonicParsing="false" styleClass="checkBox" text="%effet" />
|
||||
<VBox prefHeight="200.0" prefWidth="100.0" spacing="10.0">
|
||||
<VBox prefHeight="86.0" prefWidth="195.0" spacing="10.0">
|
||||
<children>
|
||||
<Label styleClass="titre" text="%langue">
|
||||
<font>
|
||||
@ -27,7 +45,15 @@
|
||||
</Label>
|
||||
<ComboBox fx:id="langues" prefHeight="26.0" prefWidth="90.0" />
|
||||
</children>
|
||||
<VBox.margin>
|
||||
<Insets />
|
||||
</VBox.margin>
|
||||
</VBox>
|
||||
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
|
||||
<children>
|
||||
<Button alignment="CENTER" mnemonicParsing="false" onMouseClicked="#enregistre" styleClass="bouton" stylesheets="@style/menu.css" text="%enregistrer" />
|
||||
</children>
|
||||
</HBox>
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
@ -37,6 +63,5 @@
|
||||
<Font size="36.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Button layoutX="340.0" layoutY="525.0" mnemonicParsing="false" onMouseClicked="#enregistre" styleClass="bouton" stylesheets="@style/menu.css" text="%enregistrer" />
|
||||
</children>
|
||||
</Pane>
|
||||
|