예제 #1
0
    public EventBase doEvent(Eventtype eventtype, List <Group> droup_list, Group group)
    {
        EventBase doingevent;

        switch (eventtype)
        {
        case Eventtype.Apes:
            apes.SetWeight(0, -1 * diplomatic_weight);
            apes.SetWeight(1, -1 * diplomatic_weight);
            apes.SetWeight(2, peace_weight);
            apes.SetWeight(3, peace_weight);
            apes.SetWeight(4, -1 * peace_weight);
            apes.SetWeight(5, leadership_weight);
            apes.SetWeight(6, leadership_weight);
            apes.SetWeight(7, leadership_weight);
            doingevent = apes.GetEvent();
            break;

        case Eventtype.Forest:
            forest.SetWeight(0, diplomatic_weight);
            forest.SetWeight(1, -1 * diplomatic_weight);
            forest.SetWeight(2, -1 * peace_weight);
            forest.SetWeight(3, leadership_weight);
            forest.SetWeight(4, -1 * leadership_weight);
            forest.SetWeight(5, leadership_weight);
            doingevent = forest.GetEvent();
            break;

        case Eventtype.Personal:
            personal.SetWeight(0, diplomatic_weight);
            personal.SetWeight(1, diplomatic_weight);
            personal.SetWeight(2, -1 * peace_weight);
            personal.SetWeight(3, -1 * peace_weight);
            personal.SetWeight(4, leadership_weight);
            personal.SetWeight(5, leadership_weight);
            personal.SetWeight(6, -1 * leadership_weight);
            personal.SetWeight(7, leadership_weight);
            doingevent = personal.GetEvent();
            break;

        case Eventtype.Word:
            doingevent = word.GetEvent();
            Poisoning(50, droup_list, doingevent);
            break;

        case Eventtype.Attack_Plant:
            doingevent = new Attack();
            break;

        case Eventtype.Battle:
            doingevent = new Battle();
            break;

        default:
            doingevent = block.GetEvent();
            break;
        }
        doingevent.DoEvent(droup_list, group);
        return(doingevent);
    }