Пример #1
0
        private static bool DetermineApplyToChildren(Transform element, ElementClass elementClass)
        {
            switch (elementClass)
            {
            case ElementClass.Unknown:
            case ElementClass.Container:
            case ElementClass.Panel:
            case ElementClass.Frame:
                return(true);

            case ElementClass.HeadingText:
            case ElementClass.BodyText:
            case ElementClass.MonospaceText:
            case ElementClass.Button:
            case ElementClass.Slider:
            case ElementClass.Bar:
            case ElementClass.RadioButton:
            case ElementClass.ToggleButton:
            case ElementClass.ComboBox:
            case ElementClass.InputField:
                return(false);

            default:
                Debug.LogWarning($"[ThemeEngine] Unknown element class {elementClass}");
                return(true);
            }
        }
Пример #2
0
        /// <summary>
        /// Получить координату конечной точки связи в зависимости от колличества входов и их занятости
        /// </summary>
        /// <param name="element"></param>
        /// <param name="numConnection"></param>
        /// <returns></returns>
        static Point GetFinishPoint(ElementClass element, int numConnection)
        {
            ElementControl control = new ElementControl();
            var            dCon    = control.Height / element.InCount / 2;

            Point point = new Point(element.Location.X + Math.Truncate(control.Width / 2),
                                    element.Location.Y + dCon);

            if (numConnection > 0)
            {
                if (numConnection > 1)
                {
                    point.Y += dCon * numConnection;
                }
            }
            else
            {
                for (int i = 1; i < element.InElements.Count; i++)
                {
                    point.Y += dCon * 2;
                }
            }


            return(point);
        }
Пример #3
0
            /// <summary>
            /// Return the current state of the WhitespaceBuffer, or not,
            /// depending on whether the element that is causing the whitespace
            /// to be rendered (i.e. the non-whitespace element) is a block
            /// or not.
            /// </summary>
            public string Render(ElementClass forcingElement)
            {
                if (forcingElement == ElementClass.Block)
                {
                    return(string.Empty);
                }

                switch (wsclass)
                {
                case WhitespaceClass.None:
                    return(string.Empty);

                case WhitespaceClass.Space:
                    return(" ");

                case WhitespaceClass.Break:
                    return("<" + TAG_BR + ">");

                case WhitespaceClass.Paragraph:
                    return("<" + TAG_P + ">");

                default:
                    Debug.Fail("Unexpected whitespace class " + wsclass.ToString());
                    return(string.Empty);
                }
            }
Пример #4
0
    /// <summary>
    /// 各属性ダメージのPassiveとActiveを考慮した最終的な倍率を返す
    /// </summary>
    /// <param name="passive">PassiveEffect</param>
    /// <param name="activeList">ActiveEffect</param>
    /// <returns>3属性の最終的な倍率</returns>
    public Dictionary <E_Element, double> GetRate(Dictionary <E_Element, double> passive, List <BuffEffect> activeList) //各属性ダメージのpassiveとactiveを計算して返す
    {
        double fireRate = passive[E_Element.Fire], aquaRate = passive[E_Element.Aqua], treeRate = passive[E_Element.Tree];

        foreach (BuffEffect bf in activeList)
        {
            if (ElementClass.IsFire(bf.Element))
            {
                fireRate *= bf.Rate;
            }
            if (ElementClass.IsAqua(bf.Element))
            {
                aquaRate *= bf.Rate;
            }
            if (ElementClass.IsTree(bf.Element))
            {
                treeRate *= bf.Rate;
            }
        }

        return(new Dictionary <E_Element, double>()
        {
            { E_Element.Fire, fireRate }, { E_Element.Aqua, aquaRate }, { E_Element.Tree, treeRate }
        });
    }
        // This supports the animated ellipsis. Browsers that don't support CSS3 animations will still see the static dots.
        private IReadOnlyCollection <PhrasingComponent> getProcessingDialogEllipsisDot(int dotNumber)
        {
            // This is used by EWF CSS files.
            var dotClass = new ElementClass($"ewfProcessingEllipsis{dotNumber}");

            return(new GenericPhrasingContainer(".".ToComponents(), classes: dotClass).ToCollection());
        }
Пример #6
0
        public void ElementClass()
        {
            var instance  = new ElementClass(true, "1", 2, 3);
            var roundtrip = instance.Roundtrip();

            Assert.AreEqual(instance.Value1, roundtrip.Value1);
            Assert.AreEqual(instance.Value2, roundtrip.Value2);
            Assert.AreEqual(instance.Value3, roundtrip.Value3);
            Assert.AreEqual(instance.Value4, roundtrip.Value4);
        }
Пример #7
0
    public void DeepCloneTest(DeepCloneMethod method)
    {
        Where();

        DeepClone_ConstructorCount = 0;

        RootClass a = new RootClass();

        a.Int1 = Util.RandSInt31();
        a.Str1 = a.Int1.ToString();

        a.Test1 = new ElementClass2("Hello");
        a.Test2 = new ElementClass2("Hello");
        a.Test3 = a.Test2;

        a.Test1.TestList = new List <ElementClass2>();
        a.Test1.TestList.Add(a.Test2);

        a.Test2.TestList = new List <ElementClass2>();
        a.Test2.TestList.Add(a.Test1);

        int tmp = Util.RandSInt31();

        a._GetFieldReaderWriter(true).SetValue(a, "Int2", tmp);
        a._GetFieldReaderWriter(true).SetValue(a, "Str2", tmp.ToString());

        a.Dict = new Dictionary <int, ElementClass>();

        a.Element = new ElementClass {
            Int1 = 1, Str1 = "Hello", Root = null
        };

        a.Element.Element2 = new ElementClass2("Neko");

        for (int i = 0; i < 1000; i++)
        {
            ElementClass e = new ElementClass();
            e.Int1 = Util.RandSInt31();
            e.Str1 = e.Int1.ToString();

            e._GetFieldReaderWriter(true).SetValue(e, "Int2", tmp);
            e._GetFieldReaderWriter(true).SetValue(e, "Str2", tmp.ToString());

            e.Root = a;

            a.Dict.Add(i, e);
        }

        DeepClone_ConstructorCount = 0;

        RootClass b = a._CloneDeep(method);

        Assert.False(object.ReferenceEquals(b.Test1, b.Test2));
        Assert.True(object.ReferenceEquals(b.Test2, b.Test3));
        Assert.True(object.ReferenceEquals(b.Test1 !.TestList ![0], b.Test2));
Пример #8
0
        public static InOutControl CreateOutControl(ElementClass element)
        {
            InOutControl control = new InOutControl {
                NameLabel = { Text = element.Name }, Element = element
            };

            Panel.SetZIndex(control, ElementZIndex++);
            control.SetLocation(element.Location);
            InOutControls.Add(control);
            return(control);
        }
Пример #9
0
 /// <summary>
 /// targetList全てに対しactiveEffectを発動する(倒れているtargetは除く)
 /// </summary>
 /// <param name="effect">発動するBattleActiveEffect</param>
 /// <param name="invoker">発動者</param>
 /// <param name="targetList">効果対象</param>
 /// <param name="func">呼ぶ関数</param>
 private void EffectToAllTarget(BattleActiveEffect effect, BattleCharacter invoker, List <BattleCharacter> targetList, Action <BattleCharacter, BattleActiveEffect> func)
 {
     foreach (BattleCharacter target in ElementClass.GetListInElement(targetList, effect.TargetElement))
     {
         if (!target.IsAlive)
         {
             continue;                  //とりあえず倒れているキャラに効果は付与しないことにする
         }
         func(target, effect);
     }
 }
Пример #10
0
 //Bir bileşik ve bir element gelirse
 public CompoundClass Founding(CompoundClass compound, ElementClass element)
 {
     if (compound.components.Length == 2 && element != null)
     {
         return(Founding(compound.components[0], compound.components[1], element));
     }
     else
     {
         return(null);
     }
 }
        private void AddElementMenuItem_OnClick(object sender, RoutedEventArgs e)
        {
            ElementClass element = new ElementClass {
                Location = _mousePoint
            };
            ElementControl el = GraphClass.CreateElementControl(element, ConntectionMenuItem_Click);

            el.PreviewMouseMove += El_PreviewMouseMove;
            SaverClass.Elements.Add(element);
            EditorCanvas.Children.Add(el);
            new ElementProperty(el).ShowDialog();
        }
        private void AddOutMenuItem_OnClick(object sender, RoutedEventArgs e)
        {
            ElementClass element = new ElementClass()
            {
                InCount = 1, Type = 11, Name = $"Y{SaverClass.Elements.Count(c => c.Type == 11)}"
            };

            SaverClass.Elements.Add(element);
            InOutControl outControl = GraphClass.CreateInControl(element);

            EditorCanvas.Children.Add(outControl);
            UpdateViewOut();
        }
Пример #13
0
 /// <summary>
 /// 属性ごとにフラグを保持している辞書型変数へ、フラグ(true)追加
 /// </summary>
 /// <param name="dic">属性ごとにフラグ保持している辞書型変数</param>
 /// <param name="effectElement">効果対象属性</param>
 public static void SetTrueFlag(Dictionary <E_Element, bool> dic, E_Element effectElement)
 {
     if (ElementClass.IsFire(effectElement))
     {
         dic[E_Element.Fire] = true;
     }
     if (ElementClass.IsAqua(effectElement))
     {
         dic[E_Element.Aqua] = true;
     }
     if (ElementClass.IsTree(effectElement))
     {
         dic[E_Element.Tree] = true;
     }
 }
Пример #14
0
 /// <summary>
 /// 属性ごとに倍率を保持している辞書型変数へ、倍率追加
 /// </summary>
 /// <param name="dic">属性ごとに倍率保持している辞書型変数</param>
 /// <param name="effectElement">効果対象属性</param>
 /// <param name="addRateValue">追加倍率</param>
 public static void AddRate(Dictionary <E_Element, double> dic, E_Element effectElement, double addRateValue)
 {
     if (ElementClass.IsFire(effectElement))
     {
         dic[E_Element.Fire] *= addRateValue;
     }
     if (ElementClass.IsAqua(effectElement))
     {
         dic[E_Element.Aqua] *= addRateValue;
     }
     if (ElementClass.IsTree(effectElement))
     {
         dic[E_Element.Tree] *= addRateValue;
     }
 }
Пример #15
0
 /// <summary>
 /// 属性ごとにターンを保持している辞書型変数へ、ターン増加(ActiveEffect)
 /// </summary>
 /// <param name="dic">属性ごとにターン保持している辞書型変数</param>
 /// <param name="effectElement">効果対象属性</param>
 /// <param name="addTurnValue">増加ターン数</param>
 public static void AddTurn(Dictionary <E_Element, int> dic, E_Element effectElement, int addTurnValue)
 {
     if (ElementClass.IsFire(effectElement))
     {
         dic[E_Element.Fire] += addTurnValue;
     }
     if (ElementClass.IsAqua(effectElement))
     {
         dic[E_Element.Aqua] += addTurnValue;
     }
     if (ElementClass.IsTree(effectElement))
     {
         dic[E_Element.Tree] += addTurnValue;
     }
 }
Пример #16
0
    /// <summary>
    /// passiveEffectをtargetListの中から条件を満たすtargetだけに反映させる
    /// </summary>
    /// <param name="effect">反映させるBattlePassiveEffect</param>
    /// <param name="targetList">効果対象</param>
    /// <param name="func">呼ぶ関数</param>

    private void EffectToAllTarget(BattlePassiveEffect effect, List <BattleCharacter> targetList, Action <BattleCharacter> func)
    {
        foreach (BattleCharacter target in ElementClass.GetListInElementByCondition(targetList, effect.TargetElement)) //属性の条件
        {
            if (!target.IsAlive)
            {
                continue;                   //倒れているキャラに効果は反映しない
            }
            switch (effect.EffectCondition) //属性以外の条件
            {
            case E_BattlePassiveEffectCondition.AnyTime:
                break;

            case E_BattlePassiveEffectCondition.HpHigher:
                if (target.Condition.Hp / target.Condition.MaxHp < effect.ConditionValue)
                {
                    continue;
                }
                break;

            case E_BattlePassiveEffectCondition.HpLower:
                if (target.Condition.Hp / target.Condition.MaxHp > effect.ConditionValue)
                {
                    continue;
                }
                break;

            case E_BattlePassiveEffectCondition.SpHigher:
                if (target.Condition.Sp < effect.ConditionValue)
                {
                    continue;
                }
                break;

            case E_BattlePassiveEffectCondition.SpLower:
                if (target.Condition.Sp > effect.ConditionValue)
                {
                    continue;
                }
                break;

            case E_BattlePassiveEffectCondition _:
                Debug.Log("error");
                continue;
            }
            func(target);
        }
    }
Пример #17
0
 /// <summary>
 /// atkElement属性からpowerのダメージ(与ダメージ計算済)
 /// </summary>
 /// <param name="power">与ダメージの最終的な威力(atk * ToNormalAttackDamageRate)</param>
 /// <param name="atkElement">通常攻撃の属性(攻撃者の属性)</param>
 public void DamagedByNormalAttack(double power, E_Element atkElement) // power = atk * normalAttackRate * elementRate
 {
     if (IsNoDamaged(atkElement))
     {
         Debug.Log(CharaClass.CharaName + "に" + ElementClass.GetStringElement(atkElement) + "属性の攻撃が効かない");
         return;
     }
     else
     {
         if (IsDefending)
         {
             power *= 0.5 * PassiveFromDamageRateInDefending;
         }
         DecreaseHp(power * this.GetFromDamageRate(atkElement) * ElementClass.GetElementCompatibilityRate(atkElement, this.Element) * FromNormalAttackRate); // 威力*属性被ダメ減*属性相性*通常被ダメ
     }
 }
Пример #18
0
    //gelen iki elementin oluşturduğu bileşiği bulur
    public CompoundClass Founding(ElementClass element1, ElementClass element2)
    {
        foundObjects = new List <CompoundClass>();

        for (int i = 0; i < Compounds.Length; i++)
        {
            for (int j = 0; j < Compounds[i].components.Length; j++)
            {
                if (element1.elektronCaunt == Compounds[i].components[j].elektronCaunt)
                {
                    foundObjects.Add(Compounds[i]);
                }
            }
        }


        foundObjects2 = new List <CompoundClass>();

        for (int i = 0; i < foundObjects.Count; i++)
        {
            for (int j = 0; j < foundObjects[i].components.Length; j++)
            {
                if (element2.elektronCaunt == foundObjects[i].components[j].elektronCaunt)
                {
                    foundObjects2.Add(foundObjects[i]);
                }
            }
        }

        foundCompound = null;

        for (int i = 0; i < foundObjects2.Count; i++)
        {
            if (foundObjects2[i].components.Length == 2)
            {
                if (element1 != element2)
                {
                    foundCompound = foundObjects2[i];
                }
            }
        }



        return(foundCompound);
    }
Пример #19
0
        /// <summary>
        /// Создание нового элемента
        /// </summary>
        /// <returns></returns>
        public static ElementControl CreateElementControl(ElementClass element, RoutedEventHandler menuHandler)
        {
            ElementControl el = new ElementControl();

            Panel.SetZIndex(el, ElementZIndex++);
            el.Element = element;
            el.UpdateView();
            el.SetLocation(element.Location);
            MenuItem connectionMenuItem = new MenuItem()
            {
                Header = "_Соединить элемент"
            };

            connectionMenuItem.Click += menuHandler;
            el.MainGrid.ContextMenu?.Items.Insert(2, connectionMenuItem);
            Elements.Add(el);
            return(el);
        }
Пример #20
0
    void Update()
    {    //Kartın Arka Resmini Çekiyor
        element  = FrontCard.GetComponent <CardBehavior>().element;
        compound = FrontCard.GetComponent <CardBehavior>().compound;

        if (element != null)
        {
            gameObject.transform.parent.Find("CardImage").gameObject.GetComponent <Image>().sprite = element.cardImageBack;
        }
        else if (compound != null)
        {
            gameObject.transform.parent.Find("CardImage").gameObject.GetComponent <Image>().sprite = compound.cardImageBack;
        }
        else
        {
            gameObject.transform.parent.Find("CardImage").gameObject.GetComponent <Image>().sprite = FrontCard.GetComponent <CardBehavior>().defaultImage;
        }
    }
Пример #21
0
        private static void DetermineElement(Transform element, out ElementClass elementClass, out ElementColorClass elementColorClass, out bool applyToChildren)
        {
            var themableComponent = element.GetComponent <ThemableElement>();

            if (themableComponent != null)
            {
                if (themableComponent.OverrideClass)
                {
                    elementClass = themableComponent.ClassOverride;
                }
                else
                {
                    elementClass = DetermineElementClass(element);
                }

                if (themableComponent.ElementColor == ThemableElement.ThemableElementColor.Auto)
                {
                    elementColorClass = DetermineElementColorClass(element, elementClass);
                }
                else if (themableComponent.ElementColor == ThemableElement.ThemableElementColor.None)
                {
                    elementColorClass = ElementColorClass.None;
                }
                else
                {
                    elementColorClass = themableComponent.ElementColor == ThemableElement.ThemableElementColor.Contrasting ? ElementColorClass.Contrasting : ElementColorClass.Normal;
                }

                if (themableComponent.ThemeChildren == ThemableElement.ThemableElementChildOption.Auto)
                {
                    applyToChildren = DetermineApplyToChildren(element, elementClass);
                }
                else
                {
                    applyToChildren = themableComponent.ThemeChildren == ThemableElement.ThemableElementChildOption.Apply;
                }
            }
            else
            {
                elementClass      = DetermineElementClass(element);
                elementColorClass = DetermineElementColorClass(element, elementClass);
                applyToChildren   = DetermineApplyToChildren(element, elementClass);
            }
        }
        private void AddInMenuItem_OnClick(object sender, RoutedEventArgs e)
        {
            ElementClass element = new ElementClass()
            {
                InCount = 0, Type = 10, Name = $"X{SaverClass.Elements.Count(c => c.Type == 10)}"
            };

            SaverClass.Elements.Add(element);
            InOutControl inControl = GraphClass.CreateInControl(element);

            inControl.MainGrid.ContextMenu = new ContextMenu();
            inControl.MainGrid.ContextMenu.Items.Add(new MenuItem()
            {
                Header = "_Соединить вход"
            });
            (inControl.MainGrid.ContextMenu.Items[0] as MenuItem).Click += ConntectionMenuItem_Click;
            EditorCanvas.Children.Add(inControl);
            UpdateViewIn();
        }
Пример #23
0
    /// <summary>
    /// PassiveEffect用の条件用保持パラメータ(Conditon)を利用した属性サーチ
    /// </summary>
    /// <param name="baseList">検索するキャラのリスト</param>
    /// <param name="searchElement">検索する属性</param>
    /// <returns>検索属性をもつキャラのリスト</returns>
    public static List <BattleCharacter> GetListInElementByCondition(List <BattleCharacter> baseList, E_Element searchElement)
    {
        List <BattleCharacter> list = new List <BattleCharacter>();

        foreach (BattleCharacter bc in baseList)
        {
            if (ElementClass.IsFire(searchElement) && ElementClass.IsFire(bc.Condition.Element))
            {
                list.Add(bc);
            }
            else if (ElementClass.IsAqua(searchElement) && ElementClass.IsAqua(bc.Condition.Element))
            {
                list.Add(bc);
            }
            else if (ElementClass.IsTree(searchElement) && ElementClass.IsTree(bc.Condition.Element))
            {
                list.Add(bc);
            }
        }
        return(list);
    }
Пример #24
0
    /// <summary>
    /// 属性相性の倍率を返す(攻撃火、防御火・木ならば、倍率1.5倍)
    /// </summary>
    /// <param name="attackElement">攻撃属性</param>
    /// <param name="targetElement">防御属性</param>
    /// <returns>属性相性の倍率</returns>
    public static double GetElementCompatibilityRate(E_Element attackElement, E_Element targetElement)
    {
        double rate = 1.0;

        if (ElementClass.IsFire(attackElement))
        {
            if (ElementClass.IsAqua(targetElement))
            {
                rate /= 2;
            }
            if (ElementClass.IsTree(targetElement))
            {
                rate *= 2;
            }
        }
        if (ElementClass.IsAqua(attackElement))
        {
            if (ElementClass.IsFire(targetElement))
            {
                rate *= 2;
            }
            if (ElementClass.IsTree(targetElement))
            {
                rate /= 2;
            }
        }
        if (ElementClass.IsTree(attackElement))
        {
            if (ElementClass.IsFire(targetElement))
            {
                rate /= 2;
            }
            if (ElementClass.IsAqua(targetElement))
            {
                rate *= 2;
            }
        }
        return(rate);
    }
        private IReadOnlyCollection <FlowComponent> getProcessingDialog()
        {
            // This is used by the EWF JavaScript file.
            var dialogClass = new ElementClass("ewfProcessingDialog");

            return
                (new GenericFlowContainer(
                     new Paragraph(
                         new Spinner().ToCollection <PhrasingComponent>()
                         .Concat(Translation.Processing.ToComponents())
                         .Concat(getProcessingDialogEllipsisDot(1))
                         .Concat(getProcessingDialogEllipsisDot(2))
                         .Concat(getProcessingDialogEllipsisDot(3)),
                         classes: processingDialogProcessingParagraphClass).ToCollection()
                     .Concat(
                         new Paragraph(
                             new EwfButton(
                                 new StandardButtonStyle(Translation.ThisSeemsToBeTakingAWhile, buttonSize: ButtonSize.ShrinkWrap),
                                 behavior: new CustomButtonBehavior(() => "stopPostBackRequest();")).ToCollection(),
                             classes: processingDialogTimeOutParagraphClass)),
                     classes: dialogClass.Add(processingDialogBlockInactiveClass)).ToCollection());
        }
Пример #26
0
    //gelen üç elementin oluşturduğu bileşiği bulur
    public CompoundClass Founding(ElementClass element1, ElementClass element2, ElementClass element3)
    {
        foundObjects = new List <CompoundClass>();

        for (int i = 0; i < Compounds.Length; i++)
        {
            for (int j = 0; j < Compounds[i].components.Length; j++)
            {
                if (element1.elektronCaunt == Compounds[i].components[j].elektronCaunt)
                {
                    foundObjects.Add(Compounds[i]);
                }
            }
        }

        foundObjects2 = new List <CompoundClass>();

        for (int i = 0; i < foundObjects.Count; i++)
        {
            for (int j = 0; j < foundObjects[i].components.Length; j++)
            {
                if (element2.elektronCaunt == foundObjects[i].components[j].elektronCaunt)
                {
                    foundObjects2.Add(foundObjects[i]);
                }
            }
        }


        foundObjects = new List <CompoundClass>();

        for (int i = 0; i < foundObjects2.Count; i++)
        {
            for (int j = 0; j < foundObjects2[i].components.Length; j++)
            {
                if (element3.elektronCaunt == foundObjects2[i].components[j].elektronCaunt)
                {
                    foundObjects.Add(foundObjects2[i]);
                }
            }
        }



        foundObjects2 = new List <CompoundClass>();


        for (int i = 0; i < foundObjects.Count; i++)
        {
            if (foundObjects[i].components.Length == 3)
            {
                if (element1.elektronCaunt == element2.elektronCaunt || element1.elektronCaunt == element3.elektronCaunt || element2.elektronCaunt == element3.elektronCaunt)
                {
                    for (int j = 0; j < foundObjects[i].components.Length; j++)
                    {
                        if (foundObjects[i].components[j].elektronCaunt != element1.elektronCaunt && foundObjects[i].components[j].elektronCaunt != element2.elektronCaunt && foundObjects[i].components[j].elektronCaunt != element3.elektronCaunt)
                        {
                        }
                        else
                        {
                            foundObjects2.Add(foundObjects[i]);
                        }
                    }
                }
            }
        }

        foundCompound = null;

        foundCompound = foundObjects2[0];

        List <ElementClass> sepet = new List <ElementClass>();

        for (int i = 0; i < foundObjects2[0].components.Length; i++)
        {
            sepet.Add(foundObjects2[0].components[i]);
        }



        for (int i = 0; i < sepet.Count; i++)
        {
            if (element1 == sepet[i])
            {
                sepet.Remove(sepet[i]);
            }
        }
        for (int i = 0; i < sepet.Count; i++)
        {
            if (element2 == sepet[i])
            {
                sepet.Remove(sepet[i]);
            }
        }
        for (int i = 0; i < sepet.Count; i++)
        {
            if (element3 == sepet[i])
            {
                sepet.Remove(sepet[i]);
            }
        }

        if (sepet.Count > 0)
        {
            return(null);
        }
        else
        {
            return(foundCompound);
        }
    }
Пример #27
0
        private static string IdentifierToName(ApplicationType appType, int identifier)
        {
            ElementClass idClass = GetClass(identifier);

            if (idClass == ElementClass.Library)
            {
                switch (identifier)
                {
                case 0x11000001: return("device");

                case 0x12000002: return("path");

                case 0x12000004: return("description");

                case 0x12000005: return("locale");

                case 0x14000006: return("inherit");

                case 0x15000007: return("truncatememory");

                case 0x14000008: return("recoverysequence");

                case 0x16000009: return("recoveryenabled");

                case 0x1700000A: return("badmemorylist");

                case 0x1600000B: return("badmemoryaccess");

                case 0x1500000C: return("firstmegabytepolicy");

                case 0x16000010: return("bootdebug");

                case 0x15000011: return("debugtype");

                case 0x15000012: return("debugaddress");

                case 0x15000013: return("debugport");

                case 0x15000014: return("baudrate");

                case 0x15000015: return("channel");

                case 0x12000016: return("targetname");

                case 0x16000017: return("noumex");

                case 0x15000018: return("debugstart");

                case 0x16000020: return("bootems");

                case 0x15000022: return("emsport");

                case 0x15000023: return("emsbaudrate");

                case 0x12000030: return("loadoptions");

                case 0x16000040: return("advancedoptions");

                case 0x16000041: return("optionsedit");

                case 0x15000042: return("keyringaddress");

                case 0x16000046: return("graphicsmodedisabled");

                case 0x15000047: return("configaccesspolicy");

                case 0x16000048: return("nointegritychecks");

                case 0x16000049: return("testsigning");

                case 0x16000050: return("extendedinput");

                case 0x15000051: return("initialconsoleinput");
                }
            }
            else if (idClass == ElementClass.Application)
            {
                switch (appType)
                {
                case ApplicationType.FirmwareBootManager:
                case ApplicationType.BootManager:
                    switch (identifier)
                    {
                    case 0x24000001: return("displayorder");

                    case 0x24000002: return("bootsequence");

                    case 0x23000003: return("default");

                    case 0x25000004: return("timeout");

                    case 0x26000005: return("resume");

                    case 0x23000006: return("resumeobject");

                    case 0x24000010: return("toolsdisplayorder");

                    case 0x26000020: return("displaybootmenu");

                    case 0x26000021: return("noerrordisplay");

                    case 0x21000022: return("bcddevice");

                    case 0x22000023: return("bcdfilepath");

                    case 0x27000030: return("customactions");
                    }

                    break;

                case ApplicationType.OsLoader:
                    switch (identifier)
                    {
                    case 0x21000001: return("osdevice");

                    case 0x22000002: return("systemroot");

                    case 0x23000003: return("resumeobject");

                    case 0x26000010: return("detecthal");

                    case 0x22000011: return("kernel");

                    case 0x22000012: return("hal");

                    case 0x22000013: return("dbgtransport");

                    case 0x25000020: return("nx");

                    case 0x25000021: return("pae");

                    case 0x26000022: return("winpe");

                    case 0x26000024: return("nocrashautoreboot");

                    case 0x26000025: return("lastknowngood");

                    case 0x26000026: return("oslnointegritychecks");

                    case 0x26000027: return("osltestsigning");

                    case 0x26000030: return("nolowmem");

                    case 0x25000031: return("removememory");

                    case 0x25000032: return("increaseuserva");

                    case 0x25000033: return("perfmem");

                    case 0x26000040: return("vga");

                    case 0x26000041: return("quietboot");

                    case 0x26000042: return("novesa");

                    case 0x25000050: return("clustermodeaddressing");

                    case 0x26000051: return("usephysicaldestination");

                    case 0x25000052: return("restrictapiccluster");

                    case 0x26000060: return("onecpu");

                    case 0x25000061: return("numproc");

                    case 0x26000062: return("maxproc");

                    case 0x25000063: return("configflags");

                    case 0x26000070: return("usefirmwarepcisettings");

                    case 0x25000071: return("msi");

                    case 0x25000072: return("pciexpress");

                    case 0x25000080: return("safeboot");

                    case 0x26000081: return("safebootalternateshell");

                    case 0x26000090: return("bootlog");

                    case 0x26000091: return("sos");

                    case 0x260000A0: return("debug");

                    case 0x260000A1: return("halbreakpoint");

                    case 0x260000B0: return("ems");

                    case 0x250000C0: return("forcefailure");

                    case 0x250000C1: return("driverloadfailurepolicy");

                    case 0x250000E0: return("bootstatuspolicy");
                    }

                    break;

                case ApplicationType.Resume:
                    switch (identifier)
                    {
                    case 0x21000001: return("filedevice");

                    case 0x22000002: return("filepath");

                    case 0x26000003: return("customsettings");

                    case 0x26000004: return("pae");

                    case 0x21000005: return("associatedosdevice");

                    case 0x26000006: return("debugoptionenabled");
                    }

                    break;

                case ApplicationType.MemoryDiagnostics:
                    switch (identifier)
                    {
                    case 0x25000001: return("passcount");

                    case 0x25000002: return("testmix");

                    case 0x25000003: return("failurecount");

                    case 0x25000004: return("testtofail");
                    }

                    break;

                case ApplicationType.NtLoader:
                case ApplicationType.SetupLoader:
                    switch (identifier)
                    {
                    case 0x22000001: return("bpbstring");
                    }

                    break;

                case ApplicationType.Startup:
                    switch (identifier)
                    {
                    case 0x26000001: return("pxesoftreboot");

                    case 0x22000002: return("applicationname");
                    }

                    break;
                }
            }
            else if (idClass == ElementClass.Device)
            {
                switch (identifier)
                {
                case 0x35000001: return("ramdiskimageoffset");

                case 0x35000002: return("ramdisktftpclientport");

                case 0x31000003: return("ramdisksdidevice");

                case 0x32000004: return("ramdisksdipath");

                case 0x35000005: return("ramdiskimagelength");

                case 0x36000006: return("exportascd");

                case 0x35000007: return("ramdisktftpblocksize");
                }
            }
            else if (idClass == ElementClass.Hidden)
            {
                switch (identifier)
                {
                case 0x45000001: return("devicetype");

                case 0x42000002: return("apprelativepath");

                case 0x42000003: return("ramdiskdevicerelativepath");

                case 0x46000004: return("omitosloaderelements");

                case 0x46000010: return("recoveryos");
                }
            }

            return(identifier.ToString("X8", CultureInfo.InvariantCulture));
        }
Пример #28
0
    /// <summary>
    /// ターン経過処理後に呼ぶ、ActiveEffect適用関数
    /// </summary>
    private void SetBuffEffectAfterElapseTurn()
    {
        foreach (BuffEffectWithType buff in this.beforeSetBuffEffect)
        {
            switch (buff.EffectType)
            {
            case E_BattleActiveEffectType.ATKバフ:
                this.atkRate.Add(buff.Buff);
                Debug.Log(CharaClass.CharaName + "のAtkが" + buff.Buff.EffectTurn + "ターン" + buff.Buff.Rate + "倍");
                break;

            case E_BattleActiveEffectType.HPバフ:
                this.hpRate.Add(buff.Buff);
                Debug.Log(CharaClass.CharaName + "のHpが" + buff.Buff.EffectTurn + "ターン" + buff.Buff.Rate + "倍");
                break;

            case E_BattleActiveEffectType.HPリジェネ:
                this.hpRegeneration.Add(buff.Buff);
                Debug.Log(CharaClass.CharaName + "が" + buff.Buff.EffectTurn + "ターンHpを" + buff.Buff.Rate + "回復");
                break;

            case E_BattleActiveEffectType.SPDバフ:
                this.spdRate.Add(buff.Buff);
                Debug.Log(CharaClass.CharaName + "のSpdが" + buff.Buff.EffectTurn + "ターン" + buff.Buff.Rate + "倍");
                break;

            case E_BattleActiveEffectType.SPリジェネ:
                this.spRegeneration.Add(buff.Buff);
                Debug.Log(CharaClass.CharaName + "が" + buff.Buff.EffectTurn + "ターンSpを" + buff.Buff.Rate + "回復");
                break;

            case E_BattleActiveEffectType.与ダメージ増減バフ:
                this.toDamageRate.Add(buff.Buff);
                Debug.Log(CharaClass.CharaName + "の" + ElementClass.GetStringElement(buff.Buff.Element) + "への与ダメージが" + buff.Buff.EffectTurn + "ターン" + buff.Buff.Rate + "倍");
                break;

            case E_BattleActiveEffectType.属性変化:
                this.elementChange = buff.Buff;
                Debug.Log(CharaClass.CharaName + "の属性が" + buff.Buff.EffectTurn + "ターン" + ElementClass.GetStringElement(buff.Buff.Element) + "属性に変化");
                break;

            case E_BattleActiveEffectType.攻撃集中:
                ElementClass.AddTurn(this.attractingEffectTurn, buff.Buff.Element, buff.Buff.EffectTurn);
                Debug.Log(CharaClass.CharaName + "が" + buff.Buff.EffectTurn + "ターン" + ElementClass.GetStringElement(buff.Buff.Element) + "属性の攻撃集中");
                break;

            case E_BattleActiveEffectType.無敵付与:
                ElementClass.AddTurn(this.noGetDamagedTurn, buff.Buff.Element, buff.Buff.EffectTurn);
                Debug.Log(CharaClass.CharaName + "が" + buff.Buff.EffectTurn + "ターン" + ElementClass.GetStringElement(buff.Buff.Element) + "属性の攻撃無敵");
                break;

            case E_BattleActiveEffectType.被ダメージ増減バフ:
                this.fromDamageRate.Add(buff.Buff);
                Debug.Log(CharaClass.CharaName + "の" + ElementClass.GetStringElement(buff.Buff.Element) + "からの被ダメージが" + buff.Buff.EffectTurn + "ターン" + buff.Buff.Rate + "倍");
                break;

            case E_BattleActiveEffectType.通常攻撃与ダメージ増減:
                this.toNormalAttackRate.Add(buff.Buff);
                Debug.Log(CharaClass.CharaName + "通常攻撃の与ダメージが" + buff.Buff.EffectTurn + "ターン" + buff.Buff.Rate + "倍");
                break;

            case E_BattleActiveEffectType.通常攻撃全体攻撃化:
                this.NormalAttackToAllTurn += buff.Buff.EffectTurn;
                Debug.Log(CharaClass.CharaName + "の通常攻撃が" + buff.Buff.EffectTurn + "ターン全体化");
                break;

            case E_BattleActiveEffectType.通常攻撃回数追加:
                this.normalAttackNum.Add(buff.Buff);
                Debug.Log(CharaClass.CharaName + "通常攻撃回数が" + buff.Buff.EffectTurn + "ターン" + buff.Buff.Rate + "回増加");
                break;

            case E_BattleActiveEffectType.通常攻撃被ダメージ増減:
                this.fromNormalAttackRate.Add(buff.Buff);
                Debug.Log(CharaClass.CharaName + "の通常攻撃の被ダメージが" + buff.Buff.EffectTurn + "ターン" + buff.Buff.Rate + "倍");
                break;

            case E_BattleActiveEffectType _:
                Debug.Log("error");
                break;
            }
        }

        this.beforeSetBuffEffect = new List <BuffEffectWithType>(); //効果適用後、記憶用変数の初期化
    }
Пример #29
0
 /// <summary>
 /// 全て考慮したFromDamageRateの値を返す(複属性対応)
 /// </summary>
 /// <param name="damageElement">被ダメ属性</param>
 /// <returns>倍率</returns>
 public double GetFromDamageRate(E_Element damageElement)
 {
     return(ElementClass.GetRate(FromDamageRate, damageElement));
 }
Пример #30
0
 /// <summary>
 /// 全て考慮したToDamageRateの値を返す(複属性対応)
 /// </summary>
 /// <param name="attackElement">攻撃属性</param>
 /// <returns>倍率</returns>
 public double GetToDamageRate(E_Element attackElement)
 {
     return(ElementClass.GetRate(ToDamageRate, attackElement));
 }
 /// <summary>
 /// Examines the given ElementClass and modifies the internal WhitespaceBuffer state
 /// and output buffer accordingly.  Returns true if the given ElementClass was whitespace
 /// and false if not; in the former case, the corresponding element should not be added
 /// to the output buffer.
 /// </summary>
 public static bool ProcessElementClass(ref WhitespaceBuffer whitespace, StringBuilder output, ElementClass elclass, bool isBeginTag)
 {
     switch (elclass)
     {
         case ElementClass.Paragraph:
         case ElementClass.Break:
         case ElementClass.Space:
             if (whitespace == null)
                 whitespace = new WhitespaceBuffer();
             whitespace.Promote((WhitespaceClass)elclass);
             return true;
         case ElementClass.Block:
         case ElementClass.NotBlock:
             if (whitespace != null)
             {
                 output.Append(whitespace.Render(elclass));
                 whitespace = null;
             }
             return false;
         default:
             Trace.Fail("Unknown element class " + elclass.ToString());
             return false;
     }
 }
            /// <summary>
            /// Return the current state of the WhitespaceBuffer, or not,
            /// depending on whether the element that is causing the whitespace
            /// to be rendered (i.e. the non-whitespace element) is a block
            /// or not.
            /// </summary>
            public string Render(ElementClass forcingElement)
            {
                if (forcingElement == ElementClass.Block)
                    return string.Empty;

                switch (wsclass)
                {
                    case WhitespaceClass.None:
                        return string.Empty;
                    case WhitespaceClass.Space:
                        return " ";
                    case WhitespaceClass.Break:
                        return "<" + TAG_BR + ">";
                    case WhitespaceClass.Paragraph:
                        return "<" + TAG_P + ">";
                    default:
                        Debug.Fail("Unexpected whitespace class " + wsclass.ToString());
                        return string.Empty;
                }
            }