public static void appraise(ItemBasis item, bool playsound, bool alreadycorrectlog) { if (item.CurrentDetectionLevel != DetectionLevel.CORRECT) { if (playsound) GameController.SoundController.playSE(SoundNameList.SE_Appraise1); string beforename = item.Name; GameController.DungeonInformation.updateItemDetectionLevel(item.GetType(), ItemBasis.DetectionLevel.CORRECT); string aftername = item.Name; string str = "なんと、" + beforename + "は" + aftername + "だった!"; GameController.PlayingLogger.addLog(str); } else if(alreadycorrectlog){ GameController.PlayingLogger.addLogFormat("{0} は{0}だ。",item.Name); } }
public string getUnknownItemName(ItemBasis item) { return getUnknownItemName(item.GetType()); }
public UnknownItemNameElement(ItemBasis item, string unknownname, bool israndomname = true) { ElementTypeString = item.GetType().ToString(); if (israndomname) { UnknownName = WindowConfigure.setColorTag(unknownname, ColorList.UnkwonItem); } else { UnknownName = WindowConfigure.setColorTag(unknownname, ColorList.NamingItem); } }
private bool sameCodeItemComposition(ItemBasis origin, ItemBasis material) { bool success = false; if (origin.Code == ItemCode.SHOTITEM) { var shotorigin = origin as ShotItemBasis; var shotmaterial = material as ShotItemBasis; if (shotorigin.isStackable(shotmaterial)) { shotorigin.stack(shotmaterial.StackCount); } success = true; } else if (origin.Code == ItemCode.MONEY) { var moneyorigin = origin as MoneyBasis; var moneymaterial = material as MoneyBasis; moneyorigin.increaseValue(moneymaterial.Value); success = true; } else if (origin.Code == ItemCode.WEAPON || origin.Code == ItemCode.SHIELD) { var eqorigin = origin as EquipmentItemBasis; var eqmaterial = material as EquipmentItemBasis; var addend = eqmaterial.getAllowCompositionAbilities(); addend.RemoveAll(a => eqorigin.CommpositedAbilities.Contains(a)); eqorigin.CommpositedAbilities.AddRange(addend); eqorigin.addEnhancementPoint(eqmaterial.EnhancementPoint); success = true; } else if (origin.Code == ItemCode.CANE && origin.GetType() == material.GetType()) { var caneorigin = origin as CaneBasis; var canematerial = material as CaneBasis; caneorigin.increaseUseCount(canematerial.RestUseCount); success = true; } //GameController.PlayingLogger.addLogFormat("S:{0}",success); return success; }
public bool isStackable(ItemBasis item) { return (item is IStackableItem) && item.GetType() == this.GetType() && !(this.IsCommodity ^ item.IsCommodity); }