示例#1
0
        protected override void GenerateMetal(Element sourceMetal, Element destMetal)
        {
            int diff = PeriodicTable.GetMetalDifference(sourceMetal, destMetal);

            m_maxSize = Math.Max(m_maxSize, diff);

            int numAtoms = 1 << diff;

            for (int i = 1; i < numAtoms; i++)
            {
                CommandSequence.Add(CommandType.Consume, Parent.RequestElement(sourceMetal), this);
            }

            CommandSequence.Add(CommandType.Generate, destMetal, this);
        }
示例#2
0
        protected override void GenerateMetal(Element sourceMetal, Element destMetal)
        {
            int diff = PeriodicTable.GetMetalDifference(sourceMetal, destMetal);

            if (diff < 0)
            {
                throw new SolverException(Invariant($"Cannot use glyph of projection to convert {sourceMetal} to {destMetal}."));
            }

            for (int i = 0; i < diff; i++)
            {
                CommandSequence.Add(CommandType.Consume, Parent.RequestElement(Element.Quicksilver), this);
            }

            CommandSequence.Add(CommandType.Generate, destMetal, this);
        }
示例#3
0
 public override void Consume(Element element, int id)
 {
     m_numPurifiers = PeriodicTable.GetMetalDifference(element, m_targetMetal);
     m_consumeCoroutine.Next();
 }