chaotic-api/db/models/attack.js
2020-04-06 23:13:46 -04:00

61 lines
1.1 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//Chaotic Attack Card
//Mongoose
const mongoose = require('mongoose');
/*
mongoose.connect('mongodb://localhost/chaotic');
const db = mongoose.connection;
db.on('open', () => { console.log('Connection Establised!') });
*/
//Attack Schema
const attackSchema = mongoose.Schema({
name: String,
set: String,
rarity: String,
id: Number,
bp: Number,
base: Number,
fire: Number,
air: Number,
earth: Number,
water: Number,
ability: String,
flavor: String,
unique: Number,
artist: String
});
//Atack Model
const Attack = module.exports = mongoose.model('Attack', attackSchema);
//New Atack Entry
/*
Attack.create({
type: "Attack",
set: "Dawn of Perim",
number: 135,
name: "Windslash",
rarity: "Uncommon",
buildPoints: 1,
stats: {
attack: 5,
fire: 0,
air: 0,
earth: 0,
water: 0,
},
rules: [
{
rule: "",
value: 0,
description: "Your opponent turns all facedown Battlegear Cards they control face up."
}
],
}, (err, attack) => {
console.log(attack.name + ' Added!');
process.exit(); //End script
});
*/