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); }
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); }
public void PreVerifier_MontantEgalLimite_DevraitEtreApprouve() { cible = new Cible(rapporteurMock); var montant = montantEgalLimite; var approuve = cible.PreVerifier(montant); Assert.That(approuve, Is.True); }
public void PreVerifier_MontantSuperieurLimite_DevraitEtreRefuse() { cible = new Cible(rapporteurMock); var montant = montantSuperieurLimite; var approuve = cible.PreVerifier(montant); Assert.That(approuve, Is.False); }
private void simulateurTirArc_QuandLaCibleChange(Cible cible) { if (cible == Cible.Excellent) { nombreDeFoisOuLeTirEstExcellent++; } nombreDeFoisOuLeTirAChange++; }
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; }
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; }
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; }
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; } } } } } }
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; }
//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; }
public Jail(string n, Couleur c, Value v, Cible cc, string d) : base(n, c, v, cc, d) { }
public ModRange(string n, Couleur c, Value v, Cible cc, string d) : base(n, c, v, cc, d) { }
public Bang(string n, Couleur c, Value v, Cible cc, string d, int p) : base(n, c, v, cc, d, p) { }
public Effect(string n, Couleur c, Value v, Cible cc, string d, int p) : base(n, c, v, cc, d) { portee = p; }
public Equipment(string n, Couleur c, Value v, Cible cc, string d) : base(n, c, v, cc, d) { }
private void Start() { c = GetComponentInParent <Cible>(); tm = FindObjectOfType <TutorialManager>(); }