public int BonusScore(BonusValue bonusValue) { switch (bonusValue) { case BonusValue.BV_0: return(0); case BonusValue.BV_5: return(5); case BonusValue.BV_10: return(10); case BonusValue.BV_15: return(15); case BonusValue.BV_20: return(20); case BonusValue.BV_25: return(25); case BonusValue.BV_30: return(30); case BonusValue.BV_35: return(35); case BonusValue.BV_40: return(40); default: return(0); } }
public bool Equals(PhysicalObject other) { if (other == null) { return(false); } return(ModelIndex.Equals(other.ModelIndex) && Handle.Equals(other.Handle) && Position.Equals(other.Position) && UprootLimit.Equals(other.UprootLimit) && CreatedBy.Equals(other.CreatedBy) && IsPickup.Equals(other.IsPickup) && IsPickupInShop.Equals(other.IsPickupInShop) && IsPickupOutOfStock.Equals(other.IsPickupOutOfStock) && IsGlassCracked.Equals(other.IsGlassCracked) && IsGlassBroken.Equals(other.IsGlassBroken) && HasBeenDamaged.Equals(other.HasBeenDamaged) && UseCarColors.Equals(other.UseCarColors) && CostValue.Equals(other.CostValue) && BonusValue.Equals(other.BonusValue) && CollisionDamageMultiplier.Equals(other.CollisionDamageMultiplier) && CollisionDamageEffect.Equals(other.CollisionDamageEffect) && SpecialCollisionResponseCases.Equals(other.SpecialCollisionResponseCases) && EndOfLifeTime.Equals(other.EndOfLifeTime) && EntityType.Equals(other.EntityType) && EntityStatus.Equals(other.EntityStatus) && EntityFlags.Equals(other.EntityFlags)); }
private string BonusString(BonusValue bv) { switch (bv) { case BonusValue.BV_0: return(" 0"); case BonusValue.BV_5: return(" 5"); case BonusValue.BV_10: return("10"); case BonusValue.BV_15: return("15"); case BonusValue.BV_20: return("20"); case BonusValue.BV_25: return("25"); case BonusValue.BV_30: return("30"); case BonusValue.BV_35: return("35"); case BonusValue.BV_40: return("40"); default: return(" "); } }
public void ExecuteBonusEarned(object bonusValue_object) { SetGameInProgress(); BonusValue bonusValue = (BonusValue)bonusValue_object; Questions [QuestionIndex].BonusEarned = bonusValue; UpdateCorrectWrongProperties(); }
bool IsThisBonusEarnedPossible(BonusValue bonusValue) { if (Questions [QuestionIndex].BonusPossible == BonusValue.None) { return(true); } return(bonusValue <= Questions [QuestionIndex].BonusPossible); }
private void SetBonusFaith(BonusValue value, int comparison) { string valueString = value.ToString(); if (value == BonusValue.Default) { valueString = "-"; } if (comparison > 0) { BonusFaith.GetComponent <TextMeshProUGUI>().text = "<color = #00ffffff>" + valueString + "</color>"; } else if (comparison < 0) { BonusFaith.GetComponent <TextMeshProUGUI>().text = "<color = red>" + valueString + "</color>"; } else { BonusFaith.GetComponent <TextMeshProUGUI>().text = valueString; } }
private BonusValue[] ParseBonuses() { BonusValue bonus1 = null; if (_cbBonus1Type.SelectedItem is BonusType bonus1Type) { bonus1 = new BonusValue { BonusTypeId = bonus1Type.Id, Value = decimal.Parse(_tbBonus1Value.Text) } } ; BonusValue bonus2 = null; if (_cbBonus2Type.SelectedItem is BonusType bonus2Type) { bonus2 = new BonusValue { BonusTypeId = bonus2Type.Id, Value = decimal.Parse(_tbBonus2Value.Text) } } ; var bonusValues = new List <BonusValue>(); if (bonus1 != null) { bonusValues.Add(bonus1); } if (bonus2 != null) { bonusValues.Add(bonus2); } return(bonusValues.ToArray()); } } }
public virtual DiceRoll GetBonus(GetBonusDto bonusDto) { if (ParentAbility != null && ParentAbility.IsActive(bonusDto) && ParentAbility.IsChargeItem()) { if (ParentAbility.Limit != null && ParentAbility.Limit.Amount != null && (ParentAbility.Limit.Amount.ActionRequired == RoundAction.AutoOnHit || ParentAbility.Limit.Amount.ActionRequired == RoundAction.AutoOnTakeDamage)) { return(BonusValue.GetBonus(bonusDto)); } var activeAbi = bonusDto.Round.ActivatedAbilities.First(x => x.AbilityId == ParentAbility.ID); var charge = ParentAbility.BonusFromCharges.First(x => x.NumberOfChargesForBonus == activeAbi.Charges); return(charge.Bonus); } if (ParentAbility != null && ParentAbility.IsActive(bonusDto) && ParentAbility.IsTradeOff()) { var activeAbi = bonusDto.Round.ActivatedAbilities.First(x => x.AbilityId == ParentAbility.ID); var toTrade = 0; if (ParentAbility.Limit.Amount.TradeWith == this) { toTrade = -activeAbi.Charges; } else { toTrade = (int)(activeAbi.Charges * activeAbi.Multiplier); } return(new DiceRoll { FixedAmount = toTrade }); } return(BonusValue.GetBonus(bonusDto)); }
public ArtifactBonus(StatKindId kindId, BonusValue value) { }
public override int GetHashCode() { int hash = 1; if (Priority != 0) { hash ^= Priority.GetHashCode(); } if (SubcategoryId.Length != 0) { hash ^= SubcategoryId.GetHashCode(); } if (IconPath.Length != 0) { hash ^= IconPath.GetHashCode(); } if (ShowQuantityBanner != false) { hash ^= ShowQuantityBanner.GetHashCode(); } if (QuantityOverride.Length != 0) { hash ^= QuantityOverride.GetHashCode(); } if (PrefabPath.Length != 0) { hash ^= PrefabPath.GetHashCode(); } if (MarketingText.Length != 0) { hash ^= MarketingText.GetHashCode(); } if (DescriptionText.Length != 0) { hash ^= DescriptionText.GetHashCode(); } if (ShowBadge != false) { hash ^= ShowBadge.GetHashCode(); } if (BonusValue != 0) { hash ^= BonusValue.GetHashCode(); } if (RarityId.Length != 0) { hash ^= RarityId.GetHashCode(); } if (PackSize != 0) { hash ^= PackSize.GetHashCode(); } if (ShowInHud != false) { hash ^= ShowInHud.GetHashCode(); } if (HudPriority != 0) { hash ^= HudPriority.GetHashCode(); } if (HudIconPath.Length != 0) { hash ^= HudIconPath.GetHashCode(); } if (Icon2Path.Length != 0) { hash ^= Icon2Path.GetHashCode(); } if (PopupImageOverride.Length != 0) { hash ^= PopupImageOverride.GetHashCode(); } if (HidePackOnSoldOut != false) { hash ^= HidePackOnSoldOut.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
bool IsThisTheBonusEarned(BonusValue bonusValue) { return(Questions [QuestionIndex].BonusEarned == bonusValue); }
bool IsThisTheBonusPossible(BonusValue bonusValue) { return(Questions [QuestionIndex].BonusPossible == bonusValue); }