Example #1
0
 public void Use()
 {
     if (Cible.GetType() != typeof(LivingPlaceable))
     {
         Cible.Detruire();
     }
 }
        public void ValidateSolde_WhenIs1000_ShouldBeTrue()
        {
            var montant = 1000;

            var resultat = Cible.PreVerifier(montant);

            Assert.True(resultat);
        }
        public void ValidateSolde_WhenIsHigherThan1000_ShouldBeFalse()
        {
            var montant = 1001;

            var resultat = Cible.PreVerifier(montant);

            Assert.False(resultat);
        }
Example #4
0
 public Card(string n, Couleur c, Value v, Cible cc, string d)
 {
     nom     = n;
     couleur = c;
     value   = v;
     cible   = cc;
     desc    = d;
 }
        public void ValidateSolde_WhenLessThan1000_ShouldBeTrue()
        {
            var montantValide = 500;

            var resultat = Cible.PreVerifier(montantValide);

            Assert.True(resultat);
        }
Example #6
0
        public void PreVerifier_MontantEgalLimite_DevraitEtreApprouve()
        {
            cible = new Cible(rapporteurMock);
            var montant = montantEgalLimite;

            var approuve = cible.PreVerifier(montant);

            Assert.That(approuve, Is.True);
        }
Example #7
0
        public void PreVerifier_MontantSuperieurLimite_DevraitEtreRefuse()
        {
            cible = new Cible(rapporteurMock);
            var montant = montantSuperieurLimite;

            var approuve = cible.PreVerifier(montant);

            Assert.That(approuve, Is.False);
        }
Example #8
0
        private void simulateurTirArc_QuandLaCibleChange(Cible cible)
        {
            if (cible == Cible.Excellent)
            {
                nombreDeFoisOuLeTirEstExcellent++;
            }

            nombreDeFoisOuLeTirAChange++;
        }
Example #9
0
        public void PreVerifier_RapporterEstPlein_DevraitEtreRefuse()
        {
            cible = new Cible(rapporteurPleinMock);
            var montant = montantPeuImporte;

            var approuve = cible.PreVerifier(montant);

            Assert.That(approuve, Is.False);
        }
        private void GererCible(Cible cible)
        {
            if (ancienTir.HasValue && ancienTir.Value != cible && QuandLaCibleChange != null)
            {
                QuandLaCibleChange(cible);
            }

            ancienTir = cible;
        }
Example #11
0
        protected virtual void AttaquerMelee()
        {
            int Dégats = PtsAttaque + Jeu.GénérateurAléatoire.Next(0, DeltaDamage + 1);

            Cible.PerdrePointsDeVie(Dégats);
            if (Cible.PtsVie <= 0)
            {
                Cible         = null;
                PositionCible = PositionCoord;
            }
            ActionActuelle = Action.ATTENDRE;
        }
Example #12
0
        protected override void AttaquerMelee()
        {
            Soundtrack.StartSoundCue("melee_swing");

            int Dégats = (PtsAttaque + Jeu.GénérateurAléatoire.Next(0, DeltaDamage + 1));

            Cible.PerdrePointsDeVie(Dégats);
            if (Cible.PtsVie <= 0)
            {
                Cible = null;
            }
            ActionActuelle = Action.ATTENDRE;
        }
Example #13
0
    public void Use()
    {
        if (Cible != Lanceur)
        {
            Vector3Int vectDiff = Cible.Position - Lanceur.Position;
            if (vectDiff.magnitude == 1)
            {
                for (int i = 0; i < nbCases; i++)
                {
                    //Si il y a de la place derrière la cible on la déplace
                    Vector3Int posConsidered = Cible.Position + vectDiff;
                    if (gameManager.GrilleJeu.Grid[posConsidered.x, posConsidered.y, posConsidered.z] == null)
                    {
                        gameManager.GrilleJeu.DeplaceBloc(Cible, posConsidered);
                    }
                    //si derrière il y avait un placeable il prend des dégats
                    else if (gameManager.GrilleJeu.Grid[posConsidered.x, posConsidered.y, posConsidered.z].GetType() == typeof(LivingPlaceable))
                    {
                        if (isSuper)
                        {
                            if (Cible.GetType() == typeof(LivingPlaceable))
                            {
                                gameManager.GameEffectManager.ToBeTreated.Add(new Damage(Cible, Lanceur, nbCases * 35));
                            }
                            gameManager.GameEffectManager.ToBeTreated.Add(new Damage(gameManager.GrilleJeu.Grid[posConsidered.x, posConsidered.y, posConsidered.z], Cible, nbCases * 35));
                            break;
                        }
                        else
                        {
                            if (Cible.GetType() == typeof(LivingPlaceable))
                            {
                                gameManager.GameEffectManager.ToBeTreated.Add(new Damage(Cible, Lanceur, nbCases * 20));
                            }
                            gameManager.GameEffectManager.ToBeTreated.Add(new Damage(gameManager.GrilleJeu.Grid[posConsidered.x, posConsidered.y, posConsidered.z], Cible, nbCases * 20));
                            break;
                        }
                    }
                    else if (gameManager.GrilleJeu.Grid[posConsidered.x, posConsidered.y, posConsidered.z].GetType() == typeof(Placeable))
                    {
                        if (isSuper)
                        {
                            //on deplace le placeable
                            gameManager.GrilleJeu.DeplaceBloc(Cible, posConsidered);
                            if (Cible.GetType() == typeof(LivingPlaceable))
                            {
                                gameManager.GameEffectManager.ToBeTreated.Add(new Damage(Cible, Lanceur, nbCases * 35));
                            }
                        }
                        else //on applique des dommages réduit si il y a lieu
                        {
                            if (Cible.GetType() == typeof(LivingPlaceable))
                            {
                                gameManager.GameEffectManager.ToBeTreated.Add(new Damage(Cible, Lanceur, nbCases * 20));
                            }

                            break;
                        }
                    }
                }
            }
        }
    }
Example #14
0
 public Item(string nom, string description, int cout, TypeElement element, Cible cible, Effet effet, int magnitude, int duree, int valeur)
     : base(nom, description, cout, element, cible, effet, magnitude, duree)
 {
     valeur_monetaire = valeur;
 }
Example #15
0
 //Constructeur
 public Habilete(string nom, string description, int cout, TypeElement element, Cible cible, Effet effet, int magnitude, int duree)
 {
     this.nom         = nom;
     this.description = description;
     this.cout        = cout;
     this.element     = element;
     this.cible       = cible;
     this.effet       = effet;
     this.magnitude   = magnitude;
     this.duree       = duree;
 }
Example #16
0
 public Jail(string n, Couleur c, Value v, Cible cc, string d) : base(n, c, v, cc, d)
 {
 }
Example #17
0
 public ModRange(string n, Couleur c, Value v, Cible cc, string d) : base(n, c, v, cc, d)
 {
 }
Example #18
0
 public Bang(string n, Couleur c, Value v, Cible cc, string d, int p) : base(n, c, v, cc, d, p)
 {
 }
Example #19
0
 public Effect(string n, Couleur c, Value v, Cible cc, string d, int p) : base(n, c, v, cc, d)
 {
     portee = p;
 }
Example #20
0
 public Equipment(string n, Couleur c, Value v, Cible cc, string d) : base(n, c, v, cc, d)
 {
 }
Example #21
0
 private void Start()
 {
     c  = GetComponentInParent <Cible>();
     tm = FindObjectOfType <TutorialManager>();
 }